• Julien Muchembled's avatar
    client: fix an AssertionError while processing late AnswerRebaseObject · 44452395
    Julien Muchembled authored
    Traceback (most recent call last):
      ...
      File "neo/client/app.py", line 507, in tpc_vote
        self.waitStoreResponses(txn_context)
      File "neo/client/app.py", line 500, in waitStoreResponses
        _waitAnyTransactionMessage(txn_context)
      File "neo/client/app.py", line 150, in _waitAnyTransactionMessage
        self._handleConflicts(txn_context)
      File "neo/client/app.py", line 474, in _handleConflicts
        self._store(txn_context, oid, conflict_serial, data)
      File "neo/client/app.py", line 410, in _store
        self._waitAnyTransactionMessage(txn_context, False)
      File "neo/client/app.py", line 145, in _waitAnyTransactionMessage
        self._waitAnyMessage(queue, block=block)
      File "neo/client/app.py", line 133, in _waitAnyMessage
        _handlePacket(conn, packet, kw)
      File "neo/lib/threaded_app.py", line 133, in _handlePacket
        handler.dispatch(conn, packet, kw)
      File "neo/lib/handler.py", line 72, in dispatch
        method(conn, *args, **kw)
      File "neo/client/handlers/storage.py", line 122, in answerRebaseObject
        assert txn_context.conflict_dict[oid] == (serial, conflict)
    AssertionError
    
    Scenario:
    0. unanswered rebase from S2
    1. conflict resolved between t1 and t2 -> S1 & S2
    2. S1 reports a new conflict
    3. S2 answers to the rebase:
       returned serial (t1) is smaller than in conflict_dict (t2)
    4. S2 reports the same conflict as in 2
    44452395
storage.py 8.24 KB