Implications of using nolock option when activating a config to remove a target route.
General information.
When activating a config to remove a target, Shareplex locks the source tables to ensure that there are no open transactions for the tables being routed thru the target that is being removed. The locking is very brief but even so, if the source database is busy, the activation may fail due to the inability to acquire a lock. Users may try to work around this issue by using “nolock” option of activate config as below:
sp_ctrl>activate config <file_name> nolock
There are two problems that can arise when using this workaround:
1. The activation process may fail to remove the named Export queue that is created for the target which has just been removed. The removal of the unwanted Export queue will involve using qview utility to remove the queue with Support’s help.
2. The Post queues in the defunct target may still have uncommitted messages which may never post as the COMMIT failed to reach them. Normally locking of the source table during such route changes ensures that no open transactions are left out when making such changes but the use of “nolock” option prevented this logic from taking hold during activation. Even though the target will now be decommissioned, one may lose those open transactions sitting in the Post queue which would have normally applied if a default activation was used.