From 3725d85509fe56f0a7faa9b8525a7a026c01d5cd Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 28 Nov 2018 13:45:54 -0500 Subject: [PATCH] rgw: data sync accepts ERR_PRECONDITION_FAILED on remove_object() sync of deletes uses an If-UnModified-Since precondition, but does not handle the corresponding ERR_PRECONDITION_FAILED error. treating this as a failure means that we'll keep retrying the delete which will never succeed. break this loop by treating ERR_PRECONDITION_FAILED as a success Fixes: http://tracker.ceph.com/issues/37448 Signed-off-by: Casey Bodley (cherry picked from commit f9d0ccf0069cb1a50621bdf8522038ab371f2a51) --- src/rgw/rgw_data_sync.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index dca9ea9196e1b..ad43157824e59 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -2546,6 +2546,10 @@ public: } logger.log("remove"); call(data_sync_module->remove_object(sync_env, *bucket_info, key, timestamp, versioned, versioned_epoch.value_or(0), &zones_trace)); + // our copy of the object is more recent, continue as if it succeeded + if (retcode == -ERR_PRECONDITION_FAILED) { + retcode = 0; + } } else if (op == CLS_RGW_OP_LINK_OLH_DM) { logger.log("creating delete marker"); set_status("creating delete marker"); -- 2.39.5