commit 348bd83b7eb638d3309ff6313d9a6501c540fa24
Author: Alistair Coles <email address hidden>
Date: Wed Aug 30 15:29:14 2017 +0100
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.
Reviewed: https:/ /review. openstack. org/499634 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=348bd83b7eb 638d3309ff6313d 9a6501c540fa24
Committed: https:/
Submitter: Zuul
Branch: master
commit 348bd83b7eb638d 3309ff6313d9a65 01c540fa24
Author: Alistair Coles <email address hidden>
Date: Wed Aug 30 15:29:14 2017 +0100
Respect co-builder partition moves when min_part_hours is zero
Repeated calls to each co-builder's _update_ last_part_ moves() are part_moved bitmap. When a component builder has zero
unnecessary and have the unfortunate side effect of resetting the
_last_
min_part_hours this results in it not preventing its co-builders from
moving parts that it has already moved.
This patch changes the CompositeRingBu ilder to call each component last_part_ moves() *once* before rebalancing any Builder' s no longer forward calls to last_part_ moves() method. Each component's part_moved bitmap is therefore preserved until for the duration
builder _update_
component builder. CooperativeRing
their _update_
_last_
of the composite rebalance.
The initialisation of the RingBuilder _last_part_moves array is moved last_part_ moves() are effective even when rebalance() has moves_epoch updated during rebalance and as a seconds_ left after its first
to the RingBuilder __init__ method, so that calls to
_update_
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_
result may report erroneous min_part_
rebalance.
Related-Change: I1b30cb3d776be4 41346a4131007d2 487a5440a81 47c2d9e8f7b3641 971d2e9f404
Closes-Bug: #1714274
Change-Id: Ib165cf974c865d