Change in vdsm[master]: virt: add ExpiringDict

fromani at redhat.com fromani at redhat.com
Fri Jan 30 10:26:56 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: virt: add ExpiringDict
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.ovirt.org/#/c/36716/6/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 53:     to access them, using get, __getitem__ or __contains__.
Line 54: 
Line 55:     Expired keys are considered absent, even though not yet
Line 56:     actually removed, for __len__.
Line 57:     This is done to not excessively slow down __len__.
> I'm not convinced: if len() is called few times, we don't care about its sp
Let's see how it looks with more correct __len__.
Line 58:     """
Line 59:     def __init__(self, ttl, clock=monotonic_time):
Line 60:         self._ttl = ttl
Line 61:         self._clock = clock


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I51e38cea6a23b7abe2375780e6ece0ff90831b6d
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer 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