fix plan cache not flush when statistic info changed

This commit is contained in:
obdev
2023-02-06 23:41:52 +08:00
committed by ob-robot
parent 537d3af901
commit ec4fd2244f

View File

@ -413,6 +413,7 @@ int ObOptStatManager::handle_refresh_stat_task(const obrpc::ObUpdateStatCacheArg
int ObOptStatManager::invalidate_plan(const uint64_t tenant_id, const uint64_t table_id)
{
int ret = OB_SUCCESS;
MTL_SWITCH(tenant_id) {
sql::ObPlanCache *pc = MTL(sql::ObPlanCache*);
if (OB_FAIL(pc->evict_plan(table_id))) {
@ -420,6 +421,7 @@ int ObOptStatManager::invalidate_plan(const uint64_t tenant_id, const uint64_t t
// use OB_SQL_PC_NOT_EXIST represent evict plan failed
ret = OB_SQL_PC_NOT_EXIST;
}
}
return ret;
}