Commit 042f5ac0 authored by Julien Muchembled's avatar Julien Muchembled

importer: fix writeback of transactions during which readCurrent() was used

Contrary to FileStorage, NEO remembers uses of readCurrent().
parent 68f26415
...@@ -813,7 +813,10 @@ class TransactionRecord(BaseStorage.TransactionRecord): ...@@ -813,7 +813,10 @@ class TransactionRecord(BaseStorage.TransactionRecord):
def __iter__(self): def __iter__(self):
tid = self.tid tid = self.tid
for oid in self._oid_list: for oid in self._oid_list:
_, compression, _, data, data_tid = self._db.fetchObject(oid, tid) r = self._db.fetchObject(oid, tid)
if r is None: # checkCurrentSerialInTransaction
continue
_, compression, _, data, data_tid = r
if data is not None: if data is not None:
data = compress.decompress_list[compression](data) data = compress.decompress_list[compression](data)
yield BaseStorage.DataRecord(oid, tid, data, data_tid) yield BaseStorage.DataRecord(oid, tid, data, data_tid)
...@@ -238,6 +238,7 @@ class ImporterTests(NEOThreadedTest): ...@@ -238,6 +238,7 @@ class ImporterTests(NEOThreadedTest):
# New writes after the switch to NEO. # New writes after the switch to NEO.
last_import = -1 last_import = -1
for i, r in enumerate(after(r)): for i, r in enumerate(after(r)):
c.readCurrent(r)
t.commit() t.commit()
if cluster.storage.dm._import: if cluster.storage.dm._import:
last_import = i last_import = i
......
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