From 5c233504b66f64cbdc2f07b5d5b3812842d6d668 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 1 Nov 2013 14:15:37 -0700 Subject: [PATCH] worker: don't try to remove opstate for deletes Only the copy operation creates an op state. If the object does not exist, there is no op state to delete. Signed-off-by: Josh Durgin --- radosgw_agent/worker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radosgw_agent/worker.py b/radosgw_agent/worker.py index d81f4ea..661f912 100644 --- a/radosgw_agent/worker.py +++ b/radosgw_agent/worker.py @@ -201,8 +201,9 @@ class DataWorker(Worker): self.wait_for_object(bucket, obj, until, local_op_id) # TODO: clean up old op states try: - client.remove_op_state(self.dest_conn, self.daemon_id, local_op_id, - bucket, obj) + if found: + client.remove_op_state(self.dest_conn, self.daemon_id, + local_op_id, bucket, obj) except Exception: log.exception('could not remove op state for daemon "%s" op_id %s', self.daemon_id, local_op_id) -- 2.47.3