Commit b793437a authored by Jim Fulton's avatar Jim Fulton

remove a race when checking whether we need to update the cache tid after verification.

parent 20f81caa
......@@ -1390,12 +1390,13 @@ class ClientStorage(object):
server.verify(oid, tid)
server.endZeoVerify()
if server_tid > self._cache.getLastTid():
# We verified the cache, and got no new invalidations
# while doing so. The records in the cache are valid,
# in that invalid current records were invalidated,
# but the last tid is wrong. Let's fix it:
self._cache.setLastTid(server_tid)
with self._lock:
if server_tid > self._cache.getLastTid():
# We verified the cache, and got no new invalidations
# while doing so. The records in the cache are valid,
# in that invalid current records were invalidated,
# but the last tid is wrong. Let's fix it:
self._cache.setLastTid(server_tid)
return "full verification"
......
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