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