mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
Merge pull request #27280 from xiexingguo/wip-39039
mgr: more GIL fixes Reviewed-by: Yan Jun <yan.jun8@zte.com.cn> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
42f777e67d
@ -593,10 +593,7 @@ void ActivePyModules::set_store(const std::string &module_name,
|
||||
|
||||
Command set_cmd;
|
||||
{
|
||||
PyThreadState *tstate = PyEval_SaveThread();
|
||||
std::lock_guard l(lock);
|
||||
PyEval_RestoreThread(tstate);
|
||||
|
||||
if (val) {
|
||||
store_cache[global_key] = *val;
|
||||
} else {
|
||||
|
@ -443,7 +443,9 @@ ceph_set_module_option(BaseMgrModule *self, PyObject *args)
|
||||
if (value) {
|
||||
val = value;
|
||||
}
|
||||
PyThreadState *tstate = PyEval_SaveThread();
|
||||
self->py_modules->set_config(module, key, val);
|
||||
PyEval_RestoreThread(tstate);
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
@ -481,7 +483,9 @@ ceph_store_set(BaseMgrModule *self, PyObject *args)
|
||||
if (value) {
|
||||
val = value;
|
||||
}
|
||||
PyThreadState *tstate = PyEval_SaveThread();
|
||||
self->py_modules->set_store(self->this_module->get_name(), key, val);
|
||||
PyEval_RestoreThread(tstate);
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user