[BUGFIX] drop tenant raise core

This commit is contained in:
obdev
2024-02-06 19:48:45 +00:00
committed by ob-robot
parent 58b436c230
commit 63d3019959
3 changed files with 14 additions and 7 deletions

View File

@ -25352,8 +25352,11 @@ int ObDDLService::drop_tenant(const ObDropTenantArg &arg)
FLOG_INFO("is standby tenant, need drop force", K(tenant_info));
}
}
if (FAILEDx(schema_guard.get_schema_version(OB_SYS_TENANT_ID, refreshed_schema_version))) {
if (OB_FAIL(ret)) {
// ignore
} else if (OB_ISNULL(tenant_schema)) {
// We need to ignore the drop tenant if exists statement in the case that the tenant has already been deleted
} else if (OB_FAIL(schema_guard.get_schema_version(OB_SYS_TENANT_ID, refreshed_schema_version))) {
LOG_WARN("failed to get tenant schema version", KR(ret));
} else if (OB_FAIL(trans.start(sql_proxy_, OB_SYS_TENANT_ID, refreshed_schema_version))) {
LOG_WARN("start transaction failed", KR(ret), K(user_tenant_id), K(refreshed_schema_version));