[FIX] memory leak of plan cache

This commit is contained in:
obdev
2022-12-06 15:38:15 +00:00
committed by ob-robot
parent 754dba3795
commit 4e11e7bc42
3 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,7 @@ ObResultSet::~ObResultSet()
inner_exec_ctx_->~ObExecContext(); inner_exec_ctx_->~ObExecContext();
inner_exec_ctx_ = NULL; inner_exec_ctx_ = NULL;
} }
ObPlanCache *pc = my_session_.get_plan_cache(); ObPlanCache *pc = my_session_.get_plan_cache_directly();
if (OB_NOT_NULL(pc)) { if (OB_NOT_NULL(pc)) {
cache_obj_guard_.force_early_release(pc); cache_obj_guard_.force_early_release(pc);
} }

View File

@ -30,7 +30,7 @@ class ObLCObjectManager
public: public:
typedef common::hash::ObHashMap<ObCacheObjID, ObILibCacheObject*> IdCacheObjectMap; typedef common::hash::ObHashMap<ObCacheObjID, ObILibCacheObject*> IdCacheObjectMap;
ObLCObjectManager() {} ObLCObjectManager() : object_id_(0) {}
int init(int64_t hash_bucket, uint64_t tenant_id); int init(int64_t hash_bucket, uint64_t tenant_id);
int alloc(ObCacheObjGuard& guard, int alloc(ObCacheObjGuard& guard,
ObLibCacheNameSpace ns, ObLibCacheNameSpace ns,

View File

@ -536,6 +536,7 @@ public:
ObPrivSet get_user_priv_set() const { return user_priv_set_; } ObPrivSet get_user_priv_set() const { return user_priv_set_; }
ObPrivSet get_db_priv_set() const { return db_priv_set_; } ObPrivSet get_db_priv_set() const { return db_priv_set_; }
ObPlanCache *get_plan_cache(); ObPlanCache *get_plan_cache();
ObPlanCache *get_plan_cache_directly() const { return plan_cache_; };
ObPsCache *get_ps_cache(); ObPsCache *get_ps_cache();
ObPlanCacheManager *get_plan_cache_manager() { return plan_cache_manager_; } ObPlanCacheManager *get_plan_cache_manager() { return plan_cache_manager_; }
obmysql::ObMySQLRequestManager *get_request_manager(); obmysql::ObMySQLRequestManager *get_request_manager();