diff --git a/src/logservice/ob_log_handler.cpp b/src/logservice/ob_log_handler.cpp index e4ff1caec1..ddca500fcb 100755 --- a/src/logservice/ob_log_handler.cpp +++ b/src/logservice/ob_log_handler.cpp @@ -1205,7 +1205,9 @@ int ObLogHandler::unlock_config_change(const int64_t lock_owner, const int64_t t { int ret = OB_SUCCESS; const int64_t abs_timeout_us = common::ObTimeUtility::current_time() + timeout_us / 2; - WLockGuardWithTimeout deps_guard(deps_lock_, abs_timeout_us, ret); + // Note: rlock is safe, the deps_lock_ is used to protect states of ObLogHandler + // such as is_in_stop_state_. + RLockGuardWithTimeout deps_guard(deps_lock_, abs_timeout_us, ret); if (IS_NOT_INIT) { ret = OB_NOT_INIT; } else if (OB_FAIL(ret)) { diff --git a/src/logservice/ob_log_handler.h b/src/logservice/ob_log_handler.h index 89b4b017a4..ecdddbf76d 100755 --- a/src/logservice/ob_log_handler.h +++ b/src/logservice/ob_log_handler.h @@ -690,6 +690,7 @@ public: bool is_offline() const override final; private: static constexpr int64_t MIN_CONN_TIMEOUT_US = 5 * 1000 * 1000; // 5s + typedef common::TCRWLock::RLockGuardWithTimeout RLockGuardWithTimeout; typedef common::TCRWLock::WLockGuardWithTimeout WLockGuardWithTimeout; private: int submit_config_change_cmd_(const LogConfigChangeCmd &req);