348bd83b7e
Repeated calls to each co-builder's _update_last_part_moves() are unnecessary and have the unfortunate side effect of resetting the _last_part_moved bitmap. When a component builder has zero min_part_hours this results in it not preventing its co-builders from moving parts that it has already moved. This patch changes the CompositeRingBuilder to call each component builder _update_last_part_moves() *once* before rebalancing any component builder. CooperativeRingBuilder's no longer forward calls to their _update_last_part_moves() method. Each component's _last_part_moved bitmap is therefore preserved until for the duration of the composite rebalance. The initialisation of the RingBuilder _last_part_moves array is moved to the RingBuilder __init__ method, so that calls to _update_last_part_moves() are effective even when rebalance() has never been called on that builder. Otherwise, during a composite rebalance, a component that has not previously been rebalanced will not have its _last_part_moves_epoch updated during rebalance and as a result may report erroneous min_part_seconds_left after its first rebalance. Related-Change: I1b30cb3d776be441346a4131007d2487a5440a81 Closes-Bug: #1714274 Change-Id: Ib165cf974c865d47c2d9e8f7b3641971d2e9f404 |
||
---|---|---|
.. | ||
__init__.py | ||
builder.py | ||
composite_builder.py | ||
ring.py | ||
utils.py |