Hi Devs,

We currently do $subject. I observed that we do this when we are acquiring
a lock and also releasing a lock (unlocking). IMHO we should not add a new
lock object when we are releasing a lock if the lock is not found. If the
lock has been already removed from the relevant map, that is an error
condition we need to fix. Even in that case if we create an add a new lock,
that error will be hidden.

What we can do is to pass an additional flag to getters in [1] to indicate
force lock re-creation if not found. For an example, [2]. For unlock
operations, this flag should be set to false. If the lock is not found, we
currently print a WARN message, which we can used to find the issue and fix
it. WDYT?

[1].
org.apache.stratos.messaging.domain.topology.locking.TopologyLockHierarchy

[2]. getTopologyLockForCluster(String clusterId, *boolean
forceCreationIfNotFound*)

-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*


* <http://wso2.com/>*

Reply via email to