svc_notify starts before svc_sysobj_cache, this way we make sure
svc_sysobj_cache gets the status callback triggered.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
void RGWSI_Notify::set_enabled(bool status)
{
- RWLock::RLocker l(watchers_lock);
+ RWLock::WLocker l(watchers_lock);
_set_enabled(status);
}
void RGWSI_Notify::_set_enabled(bool status)
{
+ enabled = status;
if (cb) {
cb->set_enabled(status);
}
{
RWLock::WLocker l(watchers_lock);
cb = _cb;
+ _set_enabled(enabled);
}
void RGWSI_Notify::schedule_context(Context *c)
std::set<int> watchers_set;
vector<RGWSI_RADOS::Obj> notify_objs;
+ bool enabled{false};
+
double inject_notify_timeout_probability{0};
unsigned max_notify_retries{0};