Nir Soffer has posted comments on this change.

Change subject: domainMonitor: Stop domain monitors concurrently
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/27573/1/vdsm/storage/domainMonitor.py
File vdsm/storage/domainMonitor.py:

Line 246: 
Line 247:             self.nextStatus.readDelay = self.domain.getReadDelay()
Line 248: 
Line 249:             # I could have been stopped while waiting for storage
Line 250:             if not self._running():
> It would be better if we had this break away points be methods that if the 
I agree, I started with this minimal change, but it is ugly.

I plan to factor out methods where are cancellation points, and have a 
@cancelpoint decorator:

    def cancelpoint(f):
        @wraps(f)
        def decorator(*a, **kw):
            if self.canceled()
                raise Canceled()
            res = f(*a, **kw)
            if self.canceled()
                raise Canceled()
            return res
        return decorator           
    
Then:

    @cancelpoint
    def acuireHostId(self):
        ...
            
What do you think?
Line 251:                 return
Line 252: 
Line 253:             stats = self.domain.getStats()
Line 254:             self.nextStatus.diskUtilization = (stats["disktotal"],


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia12f137f1ed055316767e1a9384d8982720bc564
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Xavi Francisco <xfran...@redhat.com>
Gerrit-Reviewer: Yoav Kleinberger <yklei...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to