From: Matt Benjamin Date: Wed, 11 Dec 2019 22:52:57 +0000 (-0500) Subject: rgw: lc: continue past get_obj_state() failure X-Git-Tag: v12.2.13~9^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9dd562c97a657e1071b5d6f290cc1a9c1830632;p=ceph.git rgw: lc: continue past get_obj_state() failure The get_obj_state() failure in particular could indicate a race with an object being deleted, so likely is non-fatal. By returning, lifecycle processing for the current bi-shard would not resume until re-scheduled, likely in 24 hours. Fixes: https://tracker.ceph.com/issues/43269 Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 0dcfc592435..b017972d7d4 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -421,7 +421,8 @@ int RGWLC::bucket_lc_process(string& shard_id) RGWObjState *state; int ret = store->get_obj_state(&rctx, bucket_info, obj, &state, false); if (ret < 0) { - return ret; + ldout(cct,5) << "ERROR: get_obj_state() failed for key=" << key << dendl; + continue; } if (state->mtime != obj_iter->meta.mtime)//Check mtime again to avoid delete a recently update object as much as possible continue; @@ -526,7 +527,7 @@ int RGWLC::bucket_lc_process(string& shard_id) RGWObjState *state; int ret = store->get_obj_state(&rctx, bucket_info, obj, &state, false); if (ret < 0) { - return ret; + ldout(cct,5) << "ERROR: get_obj_state() failed for key=" << obj_iter->key << dendl; } if (state->mtime != obj_iter->meta.mtime)//Check mtime again to avoid delete a recently update object as much as possible continue;