• Julien Muchembled's avatar
    storage: start replicating the partition which is furthest behind · 4d3f3723
    Julien Muchembled authored
    This fixes the following case when the backup is far behing the upstream DB,
    and there are transactions being committed at the same time:
    
    1. replicate partition 0
    2. replicate partition 0
    3. replicate partition 1
    4. replicate partition 0
    5. replicate partition 1
    6. replicate partition 2
    7. replicate partition 0
    ...
    and so on in a quadratic way.
    
    When the upstream activity was too high, the backup could even be stuck looping
    on the first partitions.
    4d3f3723
replicator.py 15.5 KB