swift/swift/common
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
..
middleware Merge "Make gate keeper to save relative location header path" 2017-09-20 17:10:44 +00:00
ring Respect co-builder partition moves when min_part_hours is zero 2017-09-27 15:05:13 +01:00
__init__.py Start using Hacking 2013-07-15 11:41:58 +02:00
base_storage_server.py Add server type in OPTIONS response 2015-01-30 00:25:28 +05:30
bufferedhttp.py Remove unnecessary exception handling 2017-07-17 19:07:07 +00:00
constraints.py Move listing formatting out to proxy middleware 2017-09-15 06:38:26 +00:00
container_sync_realms.py Use ConfigParser instead of SafeConfigParser 2016-09-12 15:02:40 +07:00
daemon.py Add multiple worker processes strategy to reconstructor 2017-07-26 16:55:10 -07:00
db.py Merge "Add Timestamp.now() helper" 2017-07-18 03:27:50 +00:00
db_replicator.py Merge "Log remote_merges during DB replication" 2017-09-14 22:30:35 +00:00
direct_client.py Move listing formatting out to proxy middleware 2017-09-15 06:38:26 +00:00
exceptions.py Fix EC ring validation at ring reload 2016-07-24 21:49:57 -07:00
header_key_dict.py Py3: Fixes header key dict 2016-11-08 12:22:12 -08:00
http.py Fix pep8 E265 warning of hacking 0.10 2015-07-30 09:33:18 +02:00
internal_client.py Move listing formatting out to proxy middleware 2017-09-15 06:38:26 +00:00
linkat.py Make object creation more atomic in Linux 2016-08-24 14:56:00 +05:30
manager.py Drop support for auth-server from common/manager 2017-03-23 11:36:59 -07:00
memcached.py Fix memcached exception out of range stacktrace 2017-09-25 18:15:56 -07:00
request_helpers.py Move listing formatting out to proxy middleware 2017-09-15 06:38:26 +00:00
splice.py Replace reduce and unichr , these are no longer available in py3 2015-07-09 21:56:29 +05:30
storage_policy.py Remove left over param 2017-07-25 21:54:14 -04:00
swob.py swob: Raise RuntimeError instead of IndexError 2017-09-11 15:21:22 +00:00
utils.py Fix deadlock when logging from a tpool thread. 2017-08-16 14:10:25 -07:00
wsgi.py Close stdout *after* binding ports 2017-07-22 00:46:16 +00:00