Change in vdsm[master]: lib: avoid circular references due to wrapping

fromani at redhat.com fromani at redhat.com
Tue Jan 12 08:24:32 UTC 2016


Francesco Romani has posted comments on this change.

Change subject: lib: avoid circular references due to wrapping
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/51630/2/lib/vdsm/libvirtconnection.py
File lib/vdsm/libvirtconnection.py:

Line 120
Line 121
Line 122
Line 123
Line 124
> This wrapping is not correct. Method that return list of virDomain objects 
I know, we need to add our protection code to all virConnect and virDomain objects we obtain.
Well, actually, I'm not sure anymore we need this protection for the same reasons you already stated, errors should bubble up


Line 107:     with __connectionLock:
Line 108:         __connections.clear()
Line 109: 
Line 110: 
Line 111: def _weakmethod(method):
> This can be much simpler, see http://pastebin.com/2hcVDatv
will update as you suggested once I'm confident enough this really solves the leak I found.
Line 112:     cls = method.im_class
Line 113:     func = method.im_func
Line 114:     instance_ref = weakref.ref(method.im_self)
Line 115:     del method


-- 
To view, visit https://gerrit.ovirt.org/51630
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I06607e63d222bf3f8037f2bda115b48feb94cb1c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list