Merge pull request #16508 from liewegas/wip-mgr-lock-cycle

mgr: fix lock cycle
This commit is contained in:
Sage Weil 2017-07-22 21:14:36 -05:00 committed by GitHub
commit 27c1d62ae9
2 changed files with 5 additions and 3 deletions

View File

@ -398,9 +398,11 @@ bool DaemonServer::handle_report(MMgrReport *m)
// always contains metadata.
}
assert(daemon != nullptr);
Mutex::Locker l(daemon->lock);
auto &daemon_counters = daemon->perf_counters;
daemon_counters.update(m);
{
Mutex::Locker l(daemon->lock);
daemon_counters.update(m);
}
// if there are any schema updates, notify the python modules
if (!m->declare_types.empty() || !m->undeclare_types.empty()) {
ostringstream oss;

View File

@ -43,7 +43,7 @@ class PyModules
Client &client;
Finisher &finisher;
mutable Mutex lock{"PyModules"};
mutable Mutex lock{"PyModules::lock"};
std::string get_site_packages();