Change in vdsm[master]: LiveMerge: fix delete while iterating

danken at redhat.com danken at redhat.com
Tue Jun 17 20:23:12 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: LiveMerge: fix delete while iterating
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

http://gerrit.ovirt.org/#/c/28863/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 5454:         # This function is meant to be called from multiple threads (ie.
Line 5455:         # VMStatsThread and API calls.  The _jobsLock ensures that a cohesive
Line 5456:         # data set is returned by serializing each call.
Line 5457:         with self._jobsLock:
Line 5458:             for jobID in jobs.keys():
actually, we could use item(), but your code is future-facing as it should work with Python3, too.
Line 5459:                 if jobs[jobID] is None:
Line 5460:                     self.untrackBlockJob(jobID)
Line 5461:                     del jobs[jobID]
Line 5462:         return jobs


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6074c58c4c9aadd60cfe2ef813d46d70ecab3eae
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list