]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgwlc: permit disabling of (default) auto-clearing of stale sessions
authorMatt Benjamin <mbenjamin@redhat.com>
Mon, 14 Feb 2022 23:26:22 +0000 (18:26 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 17 Mar 2022 15:06:48 +0000 (11:06 -0400)
Provide an option to disable automatic clearing of stale sessions--
which, unless disabled, happens after 2 lifecycle scheduling cycles.

The default behavior is most likely not desired when a debugging or
testing lifecycle processing with rgw_lc_debug_interval is set, and
therefore re-entering a running session after 2 scheduling cycles is
fairly likely.

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

index 19d599f954cfe240372d02f3d3a9d7f511c6fa96..ca5e2489198cb53d05c3d67e4a9992031a064f26 100644 (file)
@@ -3288,3 +3288,11 @@ options:
   - rgw
   flags:
   - startup
+- name: rgwlc_auto_session_clear
+  type: bool
+  level: advanced
+  desc: Automatically clear stale lifecycle sessions (i.e., after 2 idle processing cycles)
+  default: true
+  services:
+  - rgw
+  with_legacy: true
\ No newline at end of file
index 4570689eea8e3c9815d09f4727d4149cf5847b46..6ee6e8ae2f18c10fe87a055cb6b5142bfa71e8c7 100644 (file)
@@ -2005,6 +2005,10 @@ int RGWLC::process(LCWorker* worker,
 
 bool RGWLC::expired_session(time_t started)
 {
+  if (! cct->_conf->rgwlc_auto_session_clear) {
+    return false;
+  }
+
   time_t interval = (cct->_conf->rgw_lc_debug_interval > 0)
     ? cct->_conf->rgw_lc_debug_interval
     : 24*60*60;