OPTION(rgw_sync_meta_inject_err_probability, OPT_DOUBLE, 0) // range [0, 1]
-OPTION(rgw_realm_reconfigure_delay, OPT_DOUBLE, 2) // seconds to wait before reloading realm configuration
OPTION(rgw_period_push_interval, OPT_DOUBLE, 2) // seconds to wait before retrying "period push"
OPTION(rgw_period_push_interval_max, OPT_DOUBLE, 30) // maximum interval after exponential backoff
reload_scheduled = new C_Reload(this);
cond.SignalOne(); // wake reload() if it blocked on a bad configuration
- // schedule reload() with a delay so we can batch up changes
- auto delay = cct->_conf->rgw_realm_reconfigure_delay;
- timer.add_event_after(delay, reload_scheduled);
+ // schedule reload() without delay
+ timer.add_event_after(0, reload_scheduled);
- ldout(cct, 4) << "Notification on realm, reconfiguration scheduled in "
- << delay << 's' << dendl;
+ ldout(cct, 4) << "Notification on realm, reconfiguration scheduled" << dendl;
}
void RGWRealmReloader::reload()
class RGWRados;
/**
- * RGWRealmReloader responds to notifications by recreating RGWRados with the
- * updated realm configuration.
+ * RGWRealmReloader responds to new period notifications by recreating RGWRados
+ * with the updated realm configuration.
*/
class RGWRealmReloader : public RGWRealmWatcher::Watcher {
public:
* is required to ensure that they stop issuing requests on the old
* RGWRados instance, and restart with the updated configuration.
*
- * This abstraction avoids a depency on class RGWFrontend, which is only
- * defined in rgw_main.cc
+ * This abstraction avoids a depency on class RGWFrontend.
*/
class Pauser {
public:
Pauser *const frontends;
/// reload() takes a significant amount of time, so we don't want to run
- /// it in the handle_notify() thread. we choose a timer thread because we
- /// also want to add a delay (see rgw_realm_reconfigure_delay) so that we
- /// can batch up notifications within that window
+ /// it in the handle_notify() thread. we choose a timer thread instead of a
+ /// Finisher because it allows us to cancel events that were scheduled while
+ /// reload() is still running
SafeTimer timer;
Mutex mutex; //< protects access to timer and reload_scheduled
Cond cond; //< to signal reload() after an invalid realm config