Commit bd980083 authored by Jim Fulton's avatar Jim Fulton

Fixed a small race by processing invalidations after calling lastTransaction.

parent 44d71a17
......@@ -785,6 +785,9 @@ class Connection(ExportImport, object):
getattr(self._storage, 'sync', noop)()
mvc_invalidated = None
if self.opened:
self._txn_time = p64(u64(self._storage.lastTransaction()) + 1)
with self._inv_lock:
# Non-ghostifiable objects may need to read when they are
# invalidated, so we'll quickly just replace the
......@@ -821,9 +824,6 @@ class Connection(ExportImport, object):
invalidated = dict.fromkeys(self._invalidated)
self._invalidated = set()
if self.opened:
self._txn_time = p64(u64(self._storage.lastTransaction()) + 1)
if mvc_invalidated:
self._cache.invalidate(mvc_invalidated)
self._cache.invalidate(invalidated)
......
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