From: Josh Durgin Date: Fri, 1 Nov 2013 21:15:37 +0000 (-0700) Subject: worker: don't try to remove opstate for deletes X-Git-Tag: v1.1~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5c233504b66f64cbdc2f07b5d5b3812842d6d668;p=radosgw-agent.git 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 --- 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)