Commit 21a61977 authored by Julien Muchembled's avatar Julien Muchembled

storage: relax assertion

Nothing wrong actually happens.

Traceback (most recent call last):
  File "neo/scripts/", line 32, in main
  File "neo/storage/", line 194, in run
  File "neo/storage/", line 225, in _run
  File "neo/storage/", line 310, in doOperation
  File "neo/storage/", line 134, in _poll
  File "neo/lib/", line 168, in poll
  File "neo/lib/", line 220, in _poll
    if conn.readable():
  File "neo/lib/", line 483, in readable
  File "neo/lib/", line 541, in _closure
  File "neo/lib/", line 533, in close
  File "neo/storage/handlers/", line 46, in connectionClosed
  File "neo/storage/", line 594, in abortFor
  File "neo/storage/", line 570, in abort
    self._replicated.get(self.getPartition(oid))), x
AssertionError: ('\x00\x00\x00\x00\x00\x01a\xe5', '\x03\xcaZ\x04\x14o\x8e\xbb', '\x03\xcaZ\x04\x0eX{\xbb', {1: None, 21: '\x03\xcaZ\x04\x11\xc6\x94\xf6'}, set([]))
parent 1551c4a9
......@@ -556,8 +556,11 @@ class TransactionManager(EventQueue):
x = (oid, ttid, write_locking_tid,
self._replicated, transaction.lockless)
lockless = oid in transaction.lockless
assert oid in other.serial_dict and lockless == bool(
self._replicated.get(self.getPartition(oid))), x
# If there were multiple lockless writes, lockless can be
# False (after a rebase) whereas the partition is still not
# notified as replicated.
assert oid in other.serial_dict and not (lockless and
not self._replicated.get(self.getPartition(oid))), x
if not lockless:
assert not locked, x
continue # unresolved deadlock
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