Merge "object-replicator: Count sync failures in update_deleted"
This commit is contained in:
@@ -592,8 +592,8 @@ class ObjectReplicator(Daemon):
|
|||||||
self.logger.increment('partition.lock-failure.count')
|
self.logger.increment('partition.lock-failure.count')
|
||||||
except (Exception, Timeout):
|
except (Exception, Timeout):
|
||||||
self.logger.exception("Error syncing handoff partition")
|
self.logger.exception("Error syncing handoff partition")
|
||||||
stats.add_failure_stats(failure_devs_info)
|
|
||||||
finally:
|
finally:
|
||||||
|
stats.add_failure_stats(failure_devs_info)
|
||||||
target_devs_info = set([(target_dev['replication_ip'],
|
target_devs_info = set([(target_dev['replication_ip'],
|
||||||
target_dev['device'])
|
target_dev['device'])
|
||||||
for target_dev in job['nodes']])
|
for target_dev in job['nodes']])
|
||||||
|
|||||||
@@ -1004,6 +1004,7 @@ class TestObjectReplicator(unittest.TestCase):
|
|||||||
# stopped after handoffs!
|
# stopped after handoffs!
|
||||||
self.assertEqual(1, self.replicator.handoffs_remaining)
|
self.assertEqual(1, self.replicator.handoffs_remaining)
|
||||||
self.assertEqual(8, self.replicator.job_count)
|
self.assertEqual(8, self.replicator.job_count)
|
||||||
|
self.assertEqual(self.replicator.total_stats.failure, 1)
|
||||||
# in addition to the two update_deleted jobs as many as "concurrency"
|
# in addition to the two update_deleted jobs as many as "concurrency"
|
||||||
# jobs may have been spawned into the pool before the failed
|
# jobs may have been spawned into the pool before the failed
|
||||||
# update_deleted job incremented handoffs_remaining and caused the
|
# update_deleted job incremented handoffs_remaining and caused the
|
||||||
|
|||||||
Reference in New Issue
Block a user