Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nautilus: mon: take the mon lock in handle_conf_change #29373

Merged
merged 1 commit into from Aug 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/mon/Monitor.cc
Expand Up @@ -549,11 +549,19 @@ void Monitor::handle_conf_change(const ConfigProxy& conf,
if (changed.count("mon_health_to_clog") ||
changed.count("mon_health_to_clog_interval") ||
changed.count("mon_health_to_clog_tick_interval")) {
health_to_clog_update_conf(changed);
std::set<std::string> c2(changed);
finisher.queue(new C_MonContext(this, [this, c2](int) {
Mutex::Locker l(lock);
health_to_clog_update_conf(c2);
}));
}

if (changed.count("mon_scrub_interval")) {
scrub_update_interval(conf->mon_scrub_interval);
int scrub_interval = conf->mon_scrub_interval;
finisher.queue(new C_MonContext(this, [this, scrub_interval](int) {
Mutex::Locker l(lock);
scrub_update_interval(scrub_interval);
}));
}
}

Expand Down