[CP] fix px pool core at mtl_stop when create tenant failed
This commit is contained in:
		@ -196,10 +196,11 @@ int ObPxPools::DeletePoolFunc::operator() (common::hash::HashMapPair<int64_t, Ob
 | 
				
			|||||||
void ObPxPools::mtl_stop(ObPxPools *&pools)
 | 
					void ObPxPools::mtl_stop(ObPxPools *&pools)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  int ret = OB_SUCCESS;
 | 
					  int ret = OB_SUCCESS;
 | 
				
			||||||
  common::SpinWLockGuard g(pools->lock_);
 | 
					 | 
				
			||||||
  if (OB_ISNULL(pools)) {
 | 
					  if (OB_ISNULL(pools)) {
 | 
				
			||||||
 | 
					    // pools will be null if it's creating tenant and failed.
 | 
				
			||||||
    LOG_WARN("pools is null");
 | 
					    LOG_WARN("pools is null");
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
 | 
					    common::SpinWLockGuard g(pools->lock_);
 | 
				
			||||||
    StopPoolFunc stop_pool_func;
 | 
					    StopPoolFunc stop_pool_func;
 | 
				
			||||||
    if (OB_FAIL(pools->pool_map_.foreach_refactored(stop_pool_func))) {
 | 
					    if (OB_FAIL(pools->pool_map_.foreach_refactored(stop_pool_func))) {
 | 
				
			||||||
      LOG_WARN("failed to do foreach", K(ret));
 | 
					      LOG_WARN("failed to do foreach", K(ret));
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user