swift/swift/common/ring
Alistair Coles 348bd83b7e Respect co-builder partition moves when min_part_hours is zero
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
2017-09-27 15:05:13 +01:00
..
__init__.py Add license in swift/common/ring 2017-04-18 12:14:01 +00:00
builder.py Respect co-builder partition moves when min_part_hours is zero 2017-09-27 15:05:13 +01:00
composite_builder.py Respect co-builder partition moves when min_part_hours is zero 2017-09-27 15:05:13 +01:00
ring.py Merge "Add support to increase object ring partition power" 2017-07-05 14:40:42 +00:00
utils.py Merge "Fix the reST field raises in docstrings" 2017-06-29 14:49:38 +00:00