From: Matt Benjamin Date: Mon, 14 Feb 2022 23:26:22 +0000 (-0500) Subject: rgwlc: permit disabling of (default) auto-clearing of stale sessions X-Git-Tag: v18.0.0~1240^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8fc7d6d162f4badde9210f2488bf9ec5eb6ea324;p=ceph.git rgwlc: permit disabling of (default) auto-clearing of stale sessions 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 --- diff --git a/src/common/options/rgw.yaml.in b/src/common/options/rgw.yaml.in index 19d599f954cf..ca5e2489198c 100644 --- a/src/common/options/rgw.yaml.in +++ b/src/common/options/rgw.yaml.in @@ -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 diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 4570689eea8e..6ee6e8ae2f18 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -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;