This avoids a deadlock if some other message arrives before
the command reply and needs to take the mgr lock in dispatch.
Signed-off-by: Sage Weil <sage@redhat.com>
}
dout(4) << "waiting for config-keys..." << dendl;
+
// Preload config keys (`get` for plugins is to be a fast local
// operation, we we don't have to synchronize these later because
// all sets will come via mgr)
dout(10) << "listing keys" << dendl;
JSONCommand cmd;
cmd.run(monc, "{\"prefix\": \"config-key list\"}");
-
+ lock.Unlock();
cmd.wait();
+ lock.Lock();
assert(cmd.r == 0);
std::map<std::string, std::string> loaded;