From 5f0a268257989d48ef3640d1d4b2b0b5643b92ac Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Mon, 14 Feb 2022 19:51:43 -0500 Subject: [PATCH] rgwlc: permit skipping processing in RGWLC::bucket_lc_process(...) The intent is to permit tracing of the bucket processing scheduler, without expiring or transitioning any objects. Signed-off-by: Matt Benjamin --- src/common/options/rgw.yaml.in | 10 +++++++++- src/rgw/rgw_lc.cc | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/common/options/rgw.yaml.in b/src/common/options/rgw.yaml.in index ca5e2489198cb..53d7b10adeb5b 100644 --- a/src/common/options/rgw.yaml.in +++ b/src/common/options/rgw.yaml.in @@ -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 diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 6ee6e8ae2f18c..fc98082fabd76 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -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 -- 2.39.5