Releasing Endeca Locks

TL;DR

For various reasons the Endeca app may not release the locks when it errors out or finishes.

The following command will release Endeca application locks:

$./control/runcommand.sh LockManager releaseLock update_lock

#Background Tested under ATG/Endeca 11.1.

The /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin/ is an ATG component used to trigger multiple synchronous processes:

  1. A preindexing process
  2. An output process pushing repository data to the CAS
  3. Triggering a baseline pushing CAS data to the MDEX

This article focuses on point addressing issues with point #3.

Issue

When triggering a baseline in the ProductCatalogSimpleIndexingAdmin component clicking Baseline Index Button steps 1 and 2 will work through their processes while the Endeca Service will show running.

alt Baseline Index Completed Early

Baseline Index Running

Once the output is completed the Endeca Service starts and should take some time to complete. In the example image below it shows a COMPLETED status taking a total time of ~4 seconds (See EndecaIndexing Duration). This is way to quick for this size of index and should be a trigger that there is an issue that needs to be investigated.

alt Baseline Index Completed Error

Resolution

Since all records were successfully pushed to CAS a baseline can be kicked off from the Endeca /control directory with baseline_update.sh script.

$./control/baseline_update.sh
[02.10.16 19:48:34] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
[02.10.16 19:48:35] INFO: Definition has not changed.
[02.10.16 19:48:35] INFO: Starting baseline update script.
[02.10.16 19:48:35] WARNING: Failed to obtain lock.

Even though the the ProductCatalogSimpleIndexingComponent listed a successful index the logs show that the baseline failed due to unreleased locks (bug or feature).

Run the following command:

$./control/runcommand.sh LockManager releaseLock update_lock
[02.10.16 19:48:34] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
[02.10.16 19:48:35] INFO: Definition has not changed.
[02.10.16 19:48:35] INFO: Released lock 'update_lock'.

Now the baseline should take several minutes to complete or you should see logs stating that locks were aquired:

[02.10.16 19:48:34] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
[02.10.16 19:48:35] INFO: Definition has not changed.
[02.10.16 19:48:35] INFO: Starting baseline update script.
[02.10.16 19:48:35] INFO: Acquired lock 'update_lock'.
[02.10.16 19:48:36] INFO: [ITLHost] Starting shell utility 'cleanDir_cas-output'.
[02.10.16 19:48:37] INFO: [ITLHost] Starting shell utility 'cleanDir_dgidx-output'.