Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -132,11 +132,7 @@ ObPhysicalPlan::ObPhysicalPlan(MemoryContext &mem_context /* = CURRENT_CONTEXT *
enable_append_(false),
append_table_id_(0),
logical_plan_(),
is_enable_px_fast_reclaim_(false),
use_rich_format_(false),
subschema_ctx_(allocator_),
disable_auto_memory_mgr_(false),
all_local_session_vars_(&allocator_)
is_enable_px_fast_reclaim_(false)
{
}
@ -222,7 +218,6 @@ void ObPhysicalPlan::reset()
is_packed_ = false;
has_instead_of_trigger_ = false;
enable_append_ = false;
use_rich_format_ = false;
append_table_id_ = 0;
stat_.expected_worker_map_.destroy();
stat_.minimal_worker_map_.destroy();
@ -232,8 +227,6 @@ void ObPhysicalPlan::reset()
need_record_plan_info_ = false;
logical_plan_.reset();
is_enable_px_fast_reclaim_ = false;
subschema_ctx_.reset();
all_local_session_vars_.reset();
}
void ObPhysicalPlan::destroy()
@ -245,7 +238,6 @@ void ObPhysicalPlan::destroy()
expr_op_factory_.destroy();
stat_.expected_worker_map_.destroy();
stat_.minimal_worker_map_.destroy();
subschema_ctx_.destroy();
}
int ObPhysicalPlan::copy_common_info(ObPhysicalPlan &src)
@ -262,7 +254,6 @@ int ObPhysicalPlan::copy_common_info(ObPhysicalPlan &src)
//copy plan_id/hint/privs
object_id_ = src.object_id_;
min_cluster_version_ = src.min_cluster_version_;
disable_auto_memory_mgr_ = src.disable_auto_memory_mgr_;
if (OB_FAIL(set_phy_plan_hint(src.get_phy_plan_hint()))) {
LOG_WARN("Failed to copy query hint", K(ret));
} else if (OB_FAIL(set_stmt_need_privs(src.get_stmt_need_privs()))) {
@ -478,8 +469,7 @@ void ObPhysicalPlan::update_plan_stat(const ObAuditRecordData &record,
if (record.is_timeout()) {
ATOMIC_INC(&(stat_.timeout_count_));
ATOMIC_AAF(&(stat_.total_process_time_), record.get_process_time());
}
if (!GCONF.enable_perf_event) { // short route
} else if (!GCONF.enable_perf_event) { // short route
ATOMIC_AAF(&(stat_.elapsed_time_), record.get_elapsed_time());
ATOMIC_AAF(&(stat_.cpu_time_), record.get_elapsed_time() - record.exec_record_.wait_time_end_
- (record.exec_timestamp_.run_ts_ - record.exec_timestamp_.receive_ts_));
@ -699,9 +689,7 @@ int ObPhysicalPlan::inc_concurrent_num()
} else {
while(OB_SUCC(ret) && false == is_succ) {
concurrent_num = ATOMIC_LOAD(&concurrent_num_);
if (0 == max_concurrent_num_) {
ret = OB_REACH_MAX_CONCURRENT_NUM;
} else if (concurrent_num >= max_concurrent_num_) {
if (concurrent_num >= max_concurrent_num_) {
ret = OB_REACH_MAX_CONCURRENT_NUM;
} else {
new_num = concurrent_num + 1;
@ -790,10 +778,7 @@ OB_SERIALIZE_MEMBER(ObPhysicalPlan,
append_table_id_,
is_enable_px_fast_reclaim_,
gtt_session_scope_ids_,
gtt_trans_scope_ids_,
use_rich_format_,
subschema_ctx_,
disable_auto_memory_mgr_);
gtt_trans_scope_ids_);
int ObPhysicalPlan::set_table_locations(const ObTablePartitionInfoArray &infos,
ObSchemaGetterGuard &schema_guard)
@ -1022,10 +1007,6 @@ int ObPhysicalPlan::alloc_op_spec(const ObPhyOperatorType type,
op->id_ = tmp_op_id;
op->plan_ = this;
op->max_batch_size_ = (ObOperatorFactory::is_vectorized(type)) ? batch_size_ : 0;
op->use_rich_format_ = use_rich_format_
&& op->is_vectorized()
&& ObOperatorFactory::support_rich_format(type);
LOG_TRACE("alloc op spec", K(use_rich_format_), K(*op));
}
return ret;
}
@ -1353,31 +1334,5 @@ int ObPhysicalPlan::set_feedback_info(ObExecContext &ctx)
return ret;
}
int ObPhysicalPlan::set_all_local_session_vars(ObIArray<ObLocalSessionVar> *all_local_session_vars)
{
int ret = OB_SUCCESS;
if (!all_local_session_vars_.empty()) {
all_local_session_vars_.reset();
}
if (OB_ISNULL(all_local_session_vars)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected null", K(ret), K(all_local_session_vars));
} else if (OB_FAIL(all_local_session_vars_.reserve(all_local_session_vars->count()))) {
LOG_WARN("reserve for local_session_vars failed", K(ret));
} else {
for (int64_t i = 0; OB_SUCC(ret) && i < all_local_session_vars->count(); ++i) {
if (OB_FAIL(all_local_session_vars_.push_back(ObLocalSessionVar()))) {
LOG_WARN("push back local session var failed", K(ret));
} else {
all_local_session_vars_.at(i).set_allocator(&allocator_);
if (OB_FAIL(all_local_session_vars_.at(i).deep_copy(all_local_session_vars->at(i)))) {
LOG_WARN("deep copy local session vars failed", K(ret));
}
}
}
}
return ret;
}
} //namespace sql
} //namespace oceanbase