[CP] fix: fix the core induced by spf batch rescan
This commit is contained in:
@ -535,6 +535,7 @@ int ObSubPlanFilterOp::rescan()
|
||||
//We do not need alloc memory again in rescan.
|
||||
//das_batch_params_.reset();
|
||||
current_group_ = 0;
|
||||
brs_holder_.reset();
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret) && enable_left_px_batch_) {
|
||||
|
||||
@ -895,6 +895,7 @@ int ObOptimizerTraceImpl::trace_parameters()
|
||||
//for tenant parameters
|
||||
TRACE_PARAMETER(_rowsets_enabled, bool);
|
||||
TRACE_PARAMETER(_enable_px_batch_rescan, bool);
|
||||
TRACE_PARAMETER(_enable_spf_batch_rescan, bool);
|
||||
TRACE_PARAMETER(_hash_join_enabled, bool);
|
||||
TRACE_PARAMETER(_optimizer_sortmerge_join_enabled, bool);
|
||||
TRACE_PARAMETER(_nested_loop_join_enabled, bool);
|
||||
|
||||
@ -537,6 +537,15 @@ int ObLogSubPlanFilter::check_and_set_das_group_rescan()
|
||||
LOG_WARN("unexpected null", K(ret));
|
||||
} else if (OB_FAIL(session_info->get_nlj_batching_enabled(enable_das_group_rescan_))) {
|
||||
LOG_WARN("failed to get enable batch variable", K(ret));
|
||||
} else {
|
||||
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(session_info->get_effective_tenant_id()));
|
||||
if (tenant_config.is_valid()) {
|
||||
enable_das_group_rescan_ = tenant_config->_enable_spf_batch_rescan;
|
||||
LOG_TRACE("trace disable hash groupby in second stage for three-stage",
|
||||
K(enable_das_group_rescan_));
|
||||
} else {
|
||||
enable_das_group_rescan_ = false;
|
||||
}
|
||||
}
|
||||
// check use batch
|
||||
for (int64_t i = 1; OB_SUCC(ret) && enable_das_group_rescan_ && i < get_num_of_child(); i++) {
|
||||
|
||||
@ -407,6 +407,7 @@ int ObConfigInfoInPC::load_influence_plan_config()
|
||||
px_join_skew_handling_ = tenant_config->_px_join_skew_handling;
|
||||
px_join_skew_minfreq_ = static_cast<int8_t>(tenant_config->_px_join_skew_minfreq);
|
||||
min_cluster_version_ = GET_MIN_CLUSTER_VERSION();
|
||||
enable_spf_batch_rescan_ = tenant_config->_enable_spf_batch_rescan;
|
||||
enable_var_assign_use_das_ = tenant_config->_enable_var_assign_use_das;
|
||||
}
|
||||
|
||||
@ -454,6 +455,9 @@ int ObConfigInfoInPC::serialize_configs(char *buf, int buf_len, int64_t &pos)
|
||||
} else if (OB_FAIL(databuff_printf(buf, buf_len, pos,
|
||||
"%d", is_enable_px_fast_reclaim_))) {
|
||||
SQL_PC_LOG(WARN, "failed to databuff_printf", K(ret), K(is_enable_px_fast_reclaim_));
|
||||
} else if (OB_FAIL(databuff_printf(buf, buf_len, pos,
|
||||
"%d", enable_spf_batch_rescan_))) {
|
||||
SQL_PC_LOG(WARN, "failed to databuff_printf", K(ret), K(enable_spf_batch_rescan_));
|
||||
} else if (OB_FAIL(databuff_printf(buf, buf_len, pos,
|
||||
"%d", enable_var_assign_use_das_))) {
|
||||
SQL_PC_LOG(WARN, "failed to databuff_printf", K(ret), K(enable_var_assign_use_das_));
|
||||
|
||||
@ -1004,6 +1004,7 @@ public:
|
||||
px_join_skew_minfreq_(30),
|
||||
min_cluster_version_(0),
|
||||
is_enable_px_fast_reclaim_(false),
|
||||
enable_spf_batch_rescan_(false),
|
||||
enable_var_assign_use_das_(false),
|
||||
cluster_config_version_(-1),
|
||||
tenant_config_version_(-1),
|
||||
@ -1046,6 +1047,7 @@ public:
|
||||
int8_t px_join_skew_minfreq_;
|
||||
uint64_t min_cluster_version_;
|
||||
bool is_enable_px_fast_reclaim_;
|
||||
bool enable_spf_batch_rescan_;
|
||||
bool enable_var_assign_use_das_;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user