fix plan cache core because tid not conisistent when alloc and free
This commit is contained in:
@ -35,12 +35,14 @@ namespace sql
|
|||||||
int ObCacheObjectFactory::alloc(ObCacheObjGuard& guard, ObLibCacheNameSpace ns, uint64_t tenant_id)
|
int ObCacheObjectFactory::alloc(ObCacheObjGuard& guard, ObLibCacheNameSpace ns, uint64_t tenant_id)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
ObPlanCache *lib_cache = MTL(ObPlanCache*);
|
MTL_SWITCH(tenant_id) {
|
||||||
if (OB_ISNULL(lib_cache)) {
|
ObPlanCache *lib_cache = MTL(ObPlanCache*);
|
||||||
ret = OB_INVALID_ARGUMENT;
|
if (OB_ISNULL(lib_cache)) {
|
||||||
LOG_WARN("invalid null plan cache", K(ret));
|
ret = OB_INVALID_ARGUMENT;
|
||||||
} else if (OB_FAIL(lib_cache->alloc_cache_obj(guard, ns, tenant_id))) {
|
LOG_WARN("invalid null plan cache", K(ret));
|
||||||
LOG_WARN("failed to alloc cache obj", K(ret), K(ns));
|
} else if (OB_FAIL(lib_cache->alloc_cache_obj(guard, ns, tenant_id))) {
|
||||||
|
LOG_WARN("failed to alloc cache obj", K(ret), K(ns));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user