mgr/BaseMgrModule: drop GIL in ceph_store_set

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
xie xingguo 2019-03-30 11:26:19 +08:00
parent 96b7319cc9
commit 5108860c38
2 changed files with 2 additions and 3 deletions

View File

@ -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 {

View File

@ -483,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;
}