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_)) {
 | 
			
		||||
    ret = OB_NOT_INIT;
 | 
			
		||||
    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_))) {
 | 
			
		||||
    if (OB_IN_STOP_STATE == ret) {
 | 
			
		||||
      ret = OB_TENANT_NOT_IN_SERVER;
 | 
			
		||||
    }
 | 
			
		||||
  } else if (has_tenant_resource() &&
 | 
			
		||||
      OB_FAIL(GCTX.omt_->get_tenant_with_tenant_lock(session_.get_effective_tenant_id(), handle_, tenant_))) {
 | 
			
		||||
    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_))) {
 | 
			
		||||
    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 (tenant_tmp->has_stopped()) {
 | 
			
		||||
        // 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));
 | 
			
		||||
      }
 | 
			
		||||
    } else {
 | 
			
		||||
 | 
			
		||||
@ -112,9 +112,6 @@ int ObMultiTenantOperator::execute(common::ObNewRow *&row)
 | 
			
		||||
        int process_ret = OB_SUCCESS;
 | 
			
		||||
        if (tenant_ == nullptr) {
 | 
			
		||||
          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));
 | 
			
		||||
          }
 | 
			
		||||
        } else {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user