[CP] fix px pool core at mtl_stop when create tenant failed

This commit is contained in:
obdev
2024-02-08 19:39:42 +00:00
committed by ob-robot
parent 9e99fdb706
commit 86f2b264f6

View File

@ -196,10 +196,11 @@ int ObPxPools::DeletePoolFunc::operator() (common::hash::HashMapPair<int64_t, Ob
void ObPxPools::mtl_stop(ObPxPools *&pools)
{
int ret = OB_SUCCESS;
common::SpinWLockGuard g(pools->lock_);
if (OB_ISNULL(pools)) {
// pools will be null if it's creating tenant and failed.
LOG_WARN("pools is null");
} else {
common::SpinWLockGuard g(pools->lock_);
StopPoolFunc stop_pool_func;
if (OB_FAIL(pools->pool_map_.foreach_refactored(stop_pool_func))) {
LOG_WARN("failed to do foreach", K(ret));