swift/swift
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
..
account Move listing formatting out to proxy middleware 2017-09-15 06:38:26 +00:00
cli Test placeholder for dispersion_report module 2017-09-13 16:49:00 -06:00
common Respect co-builder partition moves when min_part_hours is zero 2017-09-27 15:05:13 +01:00
container Merge "Log deprecation warning for allow_versions" 2017-09-20 22:23:00 +00:00
locale Imported Translations from Zanata 2017-08-25 07:41:28 +00:00
obj Always require device dir for containers 2017-09-01 10:32:12 -07:00
proxy Merge "Delay cache invalidation during container creation" 2017-09-20 15:16:11 +00:00
__init__.py Make pbr a build-time only dependency 2013-10-29 12:29:49 -07:00