Unable to unlock the work object in multi-node environment
Users are getting an error when they click on 'End other session to Release Lock' for a case which is already locked by same user with a different Requestor session.
Unable to unlock the work object
Steps to Reproduce
1. Open a case in one session.
2. Open that same case in another session with same operator.
3. Click 'End other session to Release Lock'.
The locking mechanism change in PRPC 6.3 onwards results in both the PR_SYS_LOCKS database table and an in-memory cache being maintained. Prior to PRPC 6.3, there was no in-memory cache. The main purpose of the cache is to reduce the I/O associated with calls to the database to verify if the Requestor already has a lock on an object or not. This change has negated the way some earlier "unlock" APIs functioned, and if you now try to delete rows directly from the PR_SYS_LOCKS table, this can result in dangling/hanging locks in the memory resident cache.
Moreover, Pega 7.1.7 does not handle the case where a different Requestor try to access the work object in a multi-node environment. Clicking on 'End other session to Release Lock' throws an error as the other session does not actually terminate until the SystemPulse Agent runs on the other node and hence the lock has not yet been released, but the original node immediately attempts to re-acquire the lock and fails.
It is possible to revert to the pre-v6.3 "classic" lock management scheme, where the locks reside only in the database resident PR_SYS_LOCKS table via the prconfig setting "database/lockcache/enabled". A value of "false" for this prconfig setting results in the memory resident lock cache being disabled. The "database/lockcache/enabled" configuration option can also be defined as a Dynamic-System-Setting.
Either add below entry in prconfig.xml file of each node:
<env name="database/lockcache/enabled" value="false"/>
Create following Dynamic System Setting.
Owning RuleSet : Pega-Engine
Setting Purpose : prconfig/database/lockcache/enabled/default
Value : false
Also, modifying the WorkUnlock activity to not throw an error message when different Requestor parameter is true in multi node environment fixes the misleading error message. This change is provided under HFix-23283 in Pega 7.1.7.