swift/swift/common
Alistair Coles e7e5b87f8b db_file passed to broker should not affect it's sharding state
Previously if a ContainerBroker was constructed with
db_file=<hash>_shard.db then the broker would be in state 'SHARDED'
regardless of the presence of a <hash>.db file or not.

This seems like a bad thing, and manifests as a bug when we pass a
sharding container's db_file to the _replicate_object method. The
db_file is <hash>_shard.db (because the container is sharding). The
_replicate_object method uses this to construct a broker instance
which erroneously takes on state sharded.

If _replicate_object ends up using rsync then in _rsync_db it calls
broker.get_brokers() in order to build a list of db files to be
rsync'd, but get_brokers() only returns one broker (for the shard db)
because the broker thinks it is in state sharded. Consequently only
the shard db is rsync'd whereas both dbs should be rsync'd.

This patch decouples the sharding state from the db file passed
to the broker __init__.

Change-Id: Id63d967277ec1634008cc9ce13cefd731836e02c
2017-10-25 11:28:26 -07:00
..
middleware Merge branch 'master' into feature/deep 2017-10-13 18:04:17 +00:00
ring Accept a trade off of dispersion for balance 2017-09-25 12:37:49 -07: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 db_file passed to broker should not affect it's sharding state 2017-10-25 11:28:26 -07:00
db_replicator.py Replicate deleted shard ranges 2017-10-11 17:11:58 +00:00
direct_client.py Merge branch 'master' into merge-from-master 2017-09-20 15:55:58 -07:00
exceptions.py Add container sharding to Swift containers 2017-09-14 02:56:38 +00: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 Add container sharding to Swift containers 2017-09-14 02:56:38 +00:00
memcached.py Fix memcached exception out of range stacktrace 2017-09-25 18:15:56 -07:00
request_helpers.py Bring us closer to master 2017-09-21 13:55:04 +10: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 Change ShardRange to take a created_at arg 2017-10-17 21:11:54 +00:00
wsgi.py Close stdout *after* binding ports 2017-07-22 00:46:16 +00:00