]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: lc: continue past get_obj_state() failure 32194/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 11 Dec 2019 22:52:57 +0000 (17:52 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 11 Dec 2019 22:58:03 +0000 (17:58 -0500)
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 <mbenjamin@redhat.com>
src/rgw/rgw_lc.cc

index 0dcfc592435ff299dea0e1ebec12a3332411a586..b017972d7d4cbdd380781c487dc08b8d75a568e5 100644 (file)
@@ -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;