• Julien Muchembled's avatar
    master: fix crash when a transaction begins while a storage node starts operation · 781b4eb5
    Julien Muchembled authored
    Traceback (most recent call last):
      ...
      File "neo/lib/handler.py", line 72, in dispatch
        method(conn, *args, **kw)
      File "neo/master/handlers/client.py", line 70, in askFinishTransaction
        conn.getPeerId(),
      File "neo/master/transactions.py", line 387, in prepare
        assert node_list, (ready, failed)
    AssertionError: (set([]), frozenset([]))
    
    Master log leading to the crash:
      PACKET    #0x0009 StartOperation                 > S1
      PACKET    #0x0004 BeginTransaction               < C1
      DEBUG     Begin <...>
      PACKET    #0x0004 AnswerBeginTransaction         > C1
      PACKET    #0x0001 NotifyReady                    < S1
    
    It was wrong to process BeginTransaction before receiving NotifyReady.
    
    The changes in the storage are cosmetics: the 'ready' attribute has become
    redundant with 'operational'.
    781b4eb5
testIdentificationHandler.py 2.01 KB