Merge "Do not sync suffixes when remote rejects reconstructor sync"
This commit is contained in:
commit
f7445dda8a
@ -850,7 +850,8 @@ class ObjectReconstructor(Daemon):
|
||||
success, _ = ssync_sender(
|
||||
self, node, job, suffixes)()
|
||||
# let remote end know to rehash it's suffixes
|
||||
self.rehash_remote(node, job, suffixes)
|
||||
if success:
|
||||
self.rehash_remote(node, job, suffixes)
|
||||
# update stats for this attempt
|
||||
self.suffix_sync += len(suffixes)
|
||||
self.logger.update_stats('suffix.syncs', len(suffixes))
|
||||
|
@ -4113,6 +4113,11 @@ class TestObjectReconstructor(BaseTestObjectReconstructor):
|
||||
(node['replication_ip'], '/%s/0' % node['device']),
|
||||
(node['replication_ip'], '/%s/0/123-abc' % node['device']),
|
||||
])
|
||||
# the first (primary sync_to) node's rehash_remote will be skipped
|
||||
first_node = part_nodes[0]
|
||||
expected_suffix_calls.remove(
|
||||
(first_node['replication_ip'], '/%s/0/123-abc'
|
||||
% first_node['device']))
|
||||
|
||||
ssync_calls = []
|
||||
with mock_ssync_sender(ssync_calls,
|
||||
|
Loading…
x
Reference in New Issue
Block a user