Shubhendu Tripathi has posted comments on this change.

Change subject: engine: Avoid race condition between gluster peer probe and 
status
......................................................................


Patch Set 1:

(1 comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
Line 349:         /* Acquiring a wait lock only during a gluster peer process
Line 350:           If "gluster peer probe" and "gluster peer status" are 
executed simultaneously, the results
Line 351:           are unpredictable. Hence locking the cluster to ensure the 
sync job does not lead to race
Line 352:           condition.*/
Line 353:         Map<String, Pair<String, String>> exclusiveLocks = new 
HashMap<String, Pair<String, String>>();
Think of putting this logic into a separate method for getting the lock only
Line 354:         exclusiveLocks.put(getVds().getVdsGroupId().toString(),
Line 355:                 
LockMessagesMatchUtil.makeLockingPair(LockingGroup.GLUSTER, 
VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_OPERATION_INPROGRESS));
Line 356:         EngineLock lock = new EngineLock(exclusiveLocks, null);
Line 357:         getLockManager().acquireLockWait(lock);


-- 
To view, visit http://gerrit.ovirt.org/21015
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa76cea4c5b5bf7c444680260dd4da5b65665428
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to