Commit c1d79d72 authored by Jim Fulton's avatar Jim Fulton

Pass True to the storage sync method whe we have an IMVCCStorage

This and https://github.com/zodb/relstorage/pull/31 make RelStorage
pass with this branch (as much as they pass with master).
parent d297efda
...@@ -771,9 +771,9 @@ class Connection(ExportImport, object): ...@@ -771,9 +771,9 @@ class Connection(ExportImport, object):
def newTransaction(self, transaction=None): def newTransaction(self, transaction=None):
self._readCurrent.clear() self._readCurrent.clear()
getattr(self._storage, 'sync', noop)()
if self._mvcc_storage: if self._mvcc_storage:
self._storage.sync(True)
# Poll the storage for invalidations. # Poll the storage for invalidations.
mvc_invalidated = self._storage.poll_invalidations() mvc_invalidated = self._storage.poll_invalidations()
if mvc_invalidated is None: if mvc_invalidated is None:
...@@ -781,6 +781,7 @@ class Connection(ExportImport, object): ...@@ -781,6 +781,7 @@ class Connection(ExportImport, object):
# we need to flush the whole cache. # we need to flush the whole cache.
self._invalidatedCache = True self._invalidatedCache = True
else: else:
getattr(self._storage, 'sync', noop)()
mvc_invalidated = None mvc_invalidated = None
with self._inv_lock: with self._inv_lock:
......
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