Merge "Include policy in ran-out-of-handoffs log message"
This commit is contained in:
commit
8516f2302a
@ -487,7 +487,8 @@ class ObjectReplicator(Daemon):
|
|||||||
self.suffix_count += len(local_hash)
|
self.suffix_count += len(local_hash)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
self.logger.error('Ran out of handoffs while replicating '
|
self.logger.error('Ran out of handoffs while replicating '
|
||||||
'partition %s', job['partition'])
|
'partition %s of policy %d',
|
||||||
|
job['partition'], int(job['policy']))
|
||||||
except (Exception, Timeout):
|
except (Exception, Timeout):
|
||||||
failure_devs_info.update(target_devs_info)
|
failure_devs_info.update(target_devs_info)
|
||||||
self.logger.exception(_("Error syncing partition"))
|
self.logger.exception(_("Error syncing partition"))
|
||||||
|
@ -1811,7 +1811,8 @@ class TestObjectReplicator(unittest.TestCase):
|
|||||||
expected.append(error % node)
|
expected.append(error % node)
|
||||||
# ... and finally we get an error about running out of nodes
|
# ... and finally we get an error about running out of nodes
|
||||||
expected.append('Ran out of handoffs while replicating '
|
expected.append('Ran out of handoffs while replicating '
|
||||||
'partition %s' % job['partition'])
|
'partition %s of policy %d' %
|
||||||
|
(job['partition'], job['policy']))
|
||||||
self.assertEqual(expected, error_lines)
|
self.assertEqual(expected, error_lines)
|
||||||
self.assertEqual(len(self.replicator.partition_times), 1)
|
self.assertEqual(len(self.replicator.partition_times), 1)
|
||||||
self.assertEqual(mock_http.call_count, len(ring._devs) - 1)
|
self.assertEqual(mock_http.call_count, len(ring._devs) - 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user