diff --git a/src/storage/tx_storage/ob_ls_map.cpp b/src/storage/tx_storage/ob_ls_map.cpp index f68354a1d9..02697d1d6a 100644 --- a/src/storage/tx_storage/ob_ls_map.cpp +++ b/src/storage/tx_storage/ob_ls_map.cpp @@ -275,8 +275,8 @@ int ObLSMap::del_ls(const share::ObLSID &ls_id) } ls->next_ = NULL; } - del_ls_impl(ls); } + del_ls_impl(ls); } return ret; diff --git a/src/storage/tx_storage/ob_ls_service.cpp b/src/storage/tx_storage/ob_ls_service.cpp index 509b58fa2a..080e8be067 100644 --- a/src/storage/tx_storage/ob_ls_service.cpp +++ b/src/storage/tx_storage/ob_ls_service.cpp @@ -430,9 +430,6 @@ int ObLSService::create_ls(const obrpc::ObCreateLSArg &arg) if (IS_NOT_INIT) { ret = OB_NOT_INIT; LOG_WARN("the ls service has not been inited", K(ret)); - } else if (OB_UNLIKELY(!is_running_)) { - ret = OB_NOT_RUNNING; - LOG_WARN("ls service is not running.", K(ret)); } else if (OB_UNLIKELY(!ObServerCheckpointSlogHandler::get_instance().is_started())) { ret = OB_NOT_RUNNING; LOG_WARN("ls service does not service before slog replay finished", K(ret)); @@ -444,7 +441,10 @@ int ObLSService::create_ls(const obrpc::ObCreateLSArg &arg) LOG_WARN("get timeout ts failed", KR(ret)); } else { ObMutexGuardWithTimeout change_guard(change_lock_, abs_timeout_ts); - if (OB_FAIL(change_guard.get_ret())) { + if (OB_UNLIKELY(!is_running_)) { + ret = OB_NOT_RUNNING; + LOG_WARN("ls service is not running.", K(ret)); + } else if (OB_FAIL(change_guard.get_ret())) { LOG_WARN("lock failed, try again later", K(ret)); ret = OB_EAGAIN; } else if (OB_FAIL(check_ls_exist(arg.get_ls_id(), ls_exist))) { @@ -1038,9 +1038,6 @@ int ObLSService::create_ls_for_ha( if (IS_NOT_INIT) { ret = OB_NOT_INIT; LOG_WARN("the ls service has not been inited", K(ret)); - } else if (OB_UNLIKELY(!is_running_)) { - ret = OB_NOT_RUNNING; - LOG_WARN("ls service is not running.", K(ret)); } else if (OB_UNLIKELY(!ObServerCheckpointSlogHandler::get_instance().is_started())) { ret = OB_NOT_RUNNING; LOG_WARN("ls service does not service before slog replay finished", K(ret)); @@ -1055,7 +1052,10 @@ int ObLSService::create_ls_for_ha( LOG_WARN("get timeout ts failed", KR(ret)); } else { ObMutexGuardWithTimeout change_guard(change_lock_, abs_timeout_ts); - if (OB_FAIL(change_guard.get_ret())) { + if (OB_UNLIKELY(!is_running_)) { + ret = OB_NOT_RUNNING; + LOG_WARN("ls service is not running.", K(ret)); + } else if (OB_FAIL(change_guard.get_ret())) { LOG_WARN("lock failed, try again later", K(ret)); ret = OB_EAGAIN; } else if (OB_FAIL(check_ls_exist(arg.ls_id_, ls_exist))) {