diff options
author | Zuul <zuul@review.opendev.org> | 2023-02-09 09:15:02 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-02-09 09:15:02 +0000 |
commit | 231a67e1e9d4b752bb5ca8c465a887e36ef8c2bb (patch) | |
tree | 0b2c7a9dd576afc92f231d5b1d7d5039d92c1c2e | |
parent | 6994200026f7a1f2721a57943a7c346405551d55 (diff) | |
parent | c87278aba8985447a4a1746e66b4f785a602f8ab (diff) | |
download | swift-231a67e1e9d4b752bb5ca8c465a887e36ef8c2bb.tar.gz |
Merge "object-replicator: Count sync failures in update_deleted"
-rw-r--r-- | swift/obj/replicator.py | 2 | ||||
-rw-r--r-- | test/unit/obj/test_replicator.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/swift/obj/replicator.py b/swift/obj/replicator.py index ccd033071..fc729c50c 100644 --- a/swift/obj/replicator.py +++ b/swift/obj/replicator.py @@ -592,8 +592,8 @@ class ObjectReplicator(Daemon): self.logger.increment('partition.lock-failure.count') except (Exception, Timeout): self.logger.exception("Error syncing handoff partition") - stats.add_failure_stats(failure_devs_info) finally: + stats.add_failure_stats(failure_devs_info) target_devs_info = set([(target_dev['replication_ip'], target_dev['device']) for target_dev in job['nodes']]) diff --git a/test/unit/obj/test_replicator.py b/test/unit/obj/test_replicator.py index 8b35cd8e0..2abc40a4e 100644 --- a/test/unit/obj/test_replicator.py +++ b/test/unit/obj/test_replicator.py @@ -1004,6 +1004,7 @@ class TestObjectReplicator(unittest.TestCase): # stopped after handoffs! self.assertEqual(1, self.replicator.handoffs_remaining) 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" # jobs may have been spawned into the pool before the failed # update_deleted job incremented handoffs_remaining and caused the |