From f9dd562c97a657e1071b5d6f290cc1a9c1830632 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Wed, 11 Dec 2019 17:52:57 -0500 Subject: [PATCH] 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 --- src/rgw/rgw_lc.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 0dcfc592435f..b017972d7d4c 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; -- 2.47.3