const std::set <std::string> &changed)
{
dout(4) << "ohai" << dendl;
- // We may be called within lock (via MCommand `config set`) or outwith the
- // lock (via admin socket `config set`), so handle either case.
- const bool initially_locked = lock.is_locked_by_me();
- if (!initially_locked) {
- lock.Lock();
- }
if (changed.count("mgr_stats_threshold") || changed.count("mgr_stats_period")) {
dout(4) << "Updating stats threshold/period on "
<< daemon_connections.size() << " clients" << dendl;
// Send a fresh MMgrConfigure to all clients, so that they can follow
// the new policy for transmitting stats
- for (auto &c : daemon_connections) {
- _send_configure(c);
- }
+ finisher.queue(new FunctionContext([this](int r) {
+ Mutex::Locker l(lock);
+ for (auto &c : daemon_connections) {
+ _send_configure(c);
+ }
+ }));
}
}