return OB_TENANT_NOT_EXIST when get_tenant_with_tenant_lock failed
This commit is contained in:
@ -128,10 +128,8 @@ int ObInnerSQLResult::open()
|
|||||||
if (OB_UNLIKELY(!is_inited_)) {
|
if (OB_UNLIKELY(!is_inited_)) {
|
||||||
ret = OB_NOT_INIT;
|
ret = OB_NOT_INIT;
|
||||||
LOG_WARN("not init", K(ret));
|
LOG_WARN("not init", K(ret));
|
||||||
} else if (has_tenant_resource() && OB_FAIL(GCTX.omt_->get_tenant_with_tenant_lock(session_.get_effective_tenant_id(), handle_, tenant_))) {
|
} else if (has_tenant_resource() &&
|
||||||
if (OB_IN_STOP_STATE == ret) {
|
OB_FAIL(GCTX.omt_->get_tenant_with_tenant_lock(session_.get_effective_tenant_id(), handle_, tenant_))) {
|
||||||
ret = OB_TENANT_NOT_IN_SERVER;
|
|
||||||
}
|
|
||||||
LOG_WARN("get tenant lock fail", K(ret), K(session_.get_effective_tenant_id()));
|
LOG_WARN("get tenant lock fail", K(ret), K(session_.get_effective_tenant_id()));
|
||||||
} else if (has_tenant_resource() && OB_FAIL(tenant_guard.switch_to(tenant_))) {
|
} else if (has_tenant_resource() && OB_FAIL(tenant_guard.switch_to(tenant_))) {
|
||||||
LOG_WARN("switch tenant failed", K(ret), K(session_.get_effective_tenant_id()));
|
LOG_WARN("switch tenant failed", K(ret), K(session_.get_effective_tenant_id()));
|
||||||
|
|||||||
@ -1592,7 +1592,7 @@ int ObMultiTenant::get_tenant_with_tenant_lock(
|
|||||||
if (OB_FAIL(tenant_tmp->try_rdlock(handle))) {
|
if (OB_FAIL(tenant_tmp->try_rdlock(handle))) {
|
||||||
if (tenant_tmp->has_stopped()) {
|
if (tenant_tmp->has_stopped()) {
|
||||||
// in some cases this error code is handled specially
|
// in some cases this error code is handled specially
|
||||||
ret = OB_IN_STOP_STATE;
|
ret = OB_TENANT_NOT_IN_SERVER;
|
||||||
LOG_WARN("fail to try rdlock tenant", K(ret), K(tenant_id));
|
LOG_WARN("fail to try rdlock tenant", K(ret), K(tenant_id));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -112,9 +112,6 @@ int ObMultiTenantOperator::execute(common::ObNewRow *&row)
|
|||||||
int process_ret = OB_SUCCESS;
|
int process_ret = OB_SUCCESS;
|
||||||
if (tenant_ == nullptr) {
|
if (tenant_ == nullptr) {
|
||||||
if (OB_FAIL(GCTX.omt_->get_tenant_with_tenant_lock(tenant_id, handle_, tenant_))) {
|
if (OB_FAIL(GCTX.omt_->get_tenant_with_tenant_lock(tenant_id, handle_, tenant_))) {
|
||||||
if (OB_IN_STOP_STATE == ret) {
|
|
||||||
ret = OB_TENANT_NOT_IN_SERVER;
|
|
||||||
}
|
|
||||||
LOG_WARN("get_tenant_with_tenant_lock", K(ret), K(tenant_id));
|
LOG_WARN("get_tenant_with_tenant_lock", K(ret), K(tenant_id));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user