• Julien Muchembled's avatar
    Fix race when tweak touches partitions that are being reported as replicated · 87c5178b
    Julien Muchembled authored
    The bug could lead to data corruption (if a partition is wrongly marked as
    UP_TO_DATE) or crashes (assertion failure on either the storage or the master).
    
    The protocol is extended to handle the following scenario:
    
        S                                    M
        partition 0 outdated
          <-- UnfinishedTransactions ------>
        replication of partition 0 ...
        partition 1 outdated
          --- UnfinishedTransactions ...
        ... replication finished
          --- ReplicationDone ...
                                             tweak
          <-- partition 1 discarded --------
                                             tweak
          <-- partition 1 outdated ---------
              ... UnfinishedTransactions -->
              ... ReplicationDone --------->
    
    The master can't simply mark all outdated cells as being updatable when it
    receives an UnfinishedTransactions packet.
    87c5178b
transactions.py 24.4 KB