diff --git a/src/observer/omt/ob_multi_tenant.cpp b/src/observer/omt/ob_multi_tenant.cpp index e96f120637..5f6bfd821c 100644 --- a/src/observer/omt/ob_multi_tenant.cpp +++ b/src/observer/omt/ob_multi_tenant.cpp @@ -964,6 +964,9 @@ int ObMultiTenant::create_tenant(const ObTenantMeta &meta, bool write_slog, cons bucket_lock_.unlock(bucket_lock_idx); } + if (OB_FAIL(ret)) { + malloc_allocator->recycle_tenant_allocator(tenant_id); + } FLOG_INFO("finish create new tenant", K(ret), K(tenant_id), K(write_slog), K(create_step), K(bucket_lock_idx)); return ret; @@ -2234,4 +2237,4 @@ int ObSrvNetworkFrame::reload_sql_thread_config() } } return ret; -} \ No newline at end of file +}