• Julien Muchembled's avatar
    storage: fix an AssertionError in internal replication · 560e4fb1
    Julien Muchembled authored
    Traceback (most recent call last):
      ...
      File "neo/storage/handlers/storage.py", line 111, in answerFetchObjects
        self.app.replicator.finish()
      File "neo/storage/replicator.py", line 370, in finish
        self._nextPartition()
      File "neo/storage/replicator.py", line 279, in _nextPartition
        assert app.pt.getCell(offset, app.uuid).isOutOfDate()
    AssertionError
    
    The scenario is:
    1. partition A: start of replication, with unfinished transactions
    2. partition A: all unfinished transactions are finished
    3. partition A: end of replication with ReplicationDone notification
    4. replication of partition B
    5. partition A: AssertionError when starting replication
    
    The bug is that in 3, the partition A is partially replicated and the storage
    node must not notify the master.
    560e4fb1
replicator.py 17.5 KB