diff --git a/swift/obj/replicator.py b/swift/obj/replicator.py index ff89b32..4ee616e 100644 --- a/swift/obj/replicator.py +++ b/swift/obj/replicator.py @@ -355,13 +355,13 @@ class ObjectReplicator(Daemon): self.delete_partition(job['path']) handoff_partition_deleted = True except (Exception, Timeout): - self.logger.exception(_("Error syncing handoff partition")) + self.logger.exception(_("Error timeout syncing handoff partition")) + self._add_failure_stats(failure_devs_info) finally: target_devs_info = set([(target_dev['replication_ip'], target_dev['device']) for target_dev in job['nodes']]) self.stats['success'] += len(target_devs_info - failure_devs_info) - self._add_failure_stats(failure_devs_info) if not handoff_partition_deleted: self.handoffs_remaining += 1 self.partition_times.append(time.time() - begin) @@ -488,11 +488,11 @@ class ObjectReplicator(Daemon): node) self.suffix_count += len(local_hash) except (Exception, Timeout): + self._add_failure_stats(failure_devs_info) failure_devs_info.update(target_devs_info) - self.logger.exception(_("Error syncing partition")) + self.logger.exception(_("Error timeout syncing partition")) finally: self.stats['success'] += len(target_devs_info - failure_devs_info) - self._add_failure_stats(failure_devs_info) self.partition_times.append(time.time() - begin) self.logger.timing_since('partition.update.timing', begin)