Skip to content

Commit

Permalink
mgr: fix deadlock in ActivePyModules::get_osdmap()
Browse files Browse the repository at this point in the history
In function "ActivePyModules::get_osdmap()", We do not read or write to
object "ActivePyModules", so it is safe to delete lock
"ActivePyModules::lock", and it can avoid other thread waiting for lock
"ActivePyModules::lock"

 Fixes: https://tracker.ceph.com/issues/48852

Signed-off-by: peng jiaqi <[email protected]>
  • Loading branch information
peng-jiaqi committed Jan 15, 2021
1 parent 1bfac61 commit 8e531ed
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/mgr/ActivePyModules.cc
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,6 @@ PyObject *ActivePyModules::get_osdmap()

PyThreadState *tstate = PyEval_SaveThread();
{
std::lock_guard l(lock);
cluster_state.with_osdmap([&](const OSDMap& o) {
newmap->deepish_copy_from(o);
});
Expand Down

0 comments on commit 8e531ed

Please sign in to comment.