]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgwlc: permit skipping processing in RGWLC::bucket_lc_process(...)
authorMatt Benjamin <mbenjamin@redhat.com>
Tue, 15 Feb 2022 00:51:43 +0000 (19:51 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 17 Mar 2022 15:06:54 +0000 (11:06 -0400)
The intent is to permit tracing of the bucket processing scheduler, without
expiring or transitioning any objects.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/common/options/rgw.yaml.in
src/rgw/rgw_lc.cc

index ca5e2489198cb53d05c3d67e4a9992031a064f26..53d7b10adeb5b5521fb2b43e7201a50175da5391 100644 (file)
@@ -3295,4 +3295,12 @@ options:
   default: true
   services:
   - rgw
-  with_legacy: true
\ No newline at end of file
+  with_legacy: true
+- name: rgwlc_skip_bucket_step
+  type: bool
+  level: advanced
+  desc: Conditionally skip the processing (but not the scheduling) of bucket lifecycle
+  default: false
+  services:
+  - rgw
+  with_legacy: true
index 6ee6e8ae2f18c10fe87a055cb6b5142bfa71e8c7..fc98082fabd76b1c94b27783ecbfca84c92aa886 100644 (file)
@@ -1720,6 +1720,12 @@ int RGWLC::bucket_lc_process(string& shard_id, LCWorker* worker,
   string bucket_tenant = result[0];
   string bucket_name = result[1];
   string bucket_marker = result[2];
+
+  ldpp_dout(this, 5) << "RGWLC::bucket_lc_process ENTER " << bucket_name << dendl;
+  if (unlikely(cct->_conf->rgwlc_skip_bucket_step)) {
+    return 0;
+  }
+
   int ret = store->get_bucket(this, nullptr, bucket_tenant, bucket_name, &bucket, null_yield);
   if (ret < 0) {
     ldpp_dout(this, 0) << "LC:get_bucket for " << bucket_name