Commit 69c5609d authored by Kirill Smelkov's avatar Kirill Smelkov

fixup! pack: Clear all non-current entries after pack

Take review feedback by @jamadden into account

- ret -> result
- use () for tuples uniformly
- no vertical alignment
parent 32c9a7af
......@@ -559,7 +559,7 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
if t is None:
t = time.time()
t = t - (days * 86400)
ret = self._call('pack', t, wait)
result = self._call('pack', t, wait)
# remove all non-current entries from the cache.
# This way we make sure that loadBefore with before < packtime, won't
# return data from the cache, instead of returning "no data" if requested object
......@@ -568,7 +568,7 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
# cache than is strictly necessary, but since access to noncurrent data
# is seldom, that should not cause problems in practice.
self._cache.clearAllNonCurrent()
return ret
return result
def store(self, oid, serial, data, version, txn):
"""Storage API: store data for an object."""
......
......@@ -250,7 +250,7 @@ class ClientCache(object):
def clearAllNonCurrent(self):
with self._lock:
f = self.f
for oid, tidofs in self.noncurrent.items():
for (oid, tidofs) in self.noncurrent.items():
for (tid, ofs) in tidofs.items():
f.seek(ofs)
status = f.read(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment