Change in vdsm[master]: [WIP] BZ#844656 Release the lock during _findDomain

fsimonce at redhat.com fsimonce at redhat.com
Wed Aug 1 16:56:08 UTC 2012


Federico Simoncelli has posted comments on this change.

Change subject: [WIP] BZ#844656 Release the lock during _findDomain
......................................................................


Patch Set 2: (2 inline comments)

....................................................
File vdsm/storage/sdc.py
Line 115:         with self._syncroot:
I'm not completely happy in assuming that this is atomic and I wanted to protect it with _syncroot.

 self.__domainCache[sdUUID] = domain

Anyway there are a couple of things that mitigate the problem: 1) we are guaranteed that only one thread (per sdUUID) reached the _findDomain part, therefore we can't have concurrent updates of the same sdUUID. 2) updating two different sdUUID at the same time leave the dictionary consistent.
That said I think we could go ahead and use this approach for a more elegant implementation.

Line 135:                 if domain:
This was related to the comment above.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8088d5fe716a3a08c3e5cef2d2d9a654ee96f60a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>


More information about the vdsm-patches mailing list