Change in vdsm[master]: sp: race in domains upgrade prevents further pool upgrades
alitke at redhat.com
alitke at redhat.com
Tue May 10 15:47:07 UTC 2016
Adam Litke has posted comments on this change.
Change subject: sp: race in domains upgrade prevents further pool upgrades
......................................................................
Patch Set 2:
(3 comments)
https://gerrit.ovirt.org/#/c/57315/2/vdsm/storage/sp.py
File vdsm/storage/sp.py:
Line 460
Line 461
Line 462
Line 463
Line 464
can you just put the [:] here without storing the local variable domainsToUpgrade? You could just move the comment down here too.
Line 459:
Line 460: # This is needed as the domain monitor registered callback and
Line 461: # the initiated update threads may modify the list while we
Line 462: # iterate over it
Line 463: domainsToUpgrade = self._domainsToUpgrade[:]
> Rather than copying the dict you can just copy the keys:
and I see now that this is a list :)
Line 464: self.log.debug("Registering with state change event")
Line 465: self.domainMonitor.onDomainStateChange.register(
Line 466: self._upgradeCallback)
Line 467: self.log.debug("Running initial domain upgrade threads")
Line 464: self.log.debug("Registering with state change event")
Line 465: self.domainMonitor.onDomainStateChange.register(
Line 466: self._upgradeCallback)
Line 467: self.log.debug("Running initial domain upgrade threads")
Line 468: for sdUUID in domainsToUpgrade:
> And iterate over the list here:
ignore :)
Line 469: concurrent.thread(self._upgradeCallback,
Line 470: args=(sdUUID, True),
Line 471: kwargs={"__securityOverride": True},
Line 472: logger=self.log.name).start()
--
To view, visit https://gerrit.ovirt.org/57315
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie384c63315214786dc62f2b4998002320e314d30
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list