[FEAT MERGE] implement SQL level resource management based on pattern match

This commit is contained in:
obdev
2023-01-04 12:39:02 +00:00
committed by ob-robot
parent cca9f7c2d2
commit 7c991b5da5
58 changed files with 2613 additions and 168 deletions

View File

@ -32,6 +32,7 @@
#include "sql/plan_cache/ob_cache_object_factory.h"
#include "pl/ob_pl.h"
#include "ob_plan_set.h"
#include "share/resource_manager/ob_resource_manager.h"
using namespace oceanbase;
using namespace common;
@ -590,6 +591,10 @@ int ObPlanSet::init_new_set(const ObPlanCacheCtx &pc_ctx,
is_ignore_stmt_ = plan.is_ignore();
//add param info
params_info_.reset();
// set variables for resource map rule
// if rule changed, plan cache will be flush.
res_map_rule_id_ = pc_ctx.sql_ctx_.res_map_rule_id_;
res_map_rule_param_idx_ = pc_ctx.sql_ctx_.res_map_rule_param_idx_;
if (OB_FAIL(init_pre_calc_exprs(plan, pc_alloc_))) {
LOG_WARN("failed to init pre calc exprs", K(ret));