[FEAT MERGE] performance optimzation for OLTP
Co-authored-by: dimstars <liangjinrongcm@gmail.com> Co-authored-by: pe-99y <315053752@qq.com>
This commit is contained in:
@ -325,7 +325,7 @@ int ObDASIndexDMLAdaptor<N, DMLIterator>::write_tablet(DMLIterator &iter, int64_
|
||||
{
|
||||
int ret = common::OB_SUCCESS;
|
||||
affected_rows = 0;
|
||||
SQL_DAS_LOG(TRACE, "begin to write the main tablet",
|
||||
SQL_DAS_LOG(DEBUG, "begin to write the main tablet",
|
||||
K(ls_id_), K(tablet_id_), K(ctdef_->table_id_), K(ctdef_->index_tid_));
|
||||
if (ctdef_->is_ignore_) {
|
||||
if (OB_FAIL(write_tablet_with_ignore(iter, affected_rows))) {
|
||||
@ -343,7 +343,7 @@ int ObDASIndexDMLAdaptor<N, DMLIterator>::write_tablet(DMLIterator &iter, int64_
|
||||
RtDefType *related_rtdef = static_cast<RtDefType*>(related_rtdefs_->at(i));
|
||||
ObTabletID related_tablet_id = related_tablet_ids_->at(i);
|
||||
int64_t index_affected_rows = 0;
|
||||
SQL_DAS_LOG(TRACE, "rewind iterator and write local index tablet",
|
||||
SQL_DAS_LOG(DEBUG, "rewind iterator and write local index tablet",
|
||||
K(ls_id_), K(related_tablet_id), K(related_ctdef->table_id_), K(related_ctdef->index_tid_));
|
||||
if (OB_FAIL(iter.rewind(related_ctdef))) {
|
||||
SQL_DAS_LOG(WARN, "rewind iterator failed", K(ret));
|
||||
|
||||
@ -1154,7 +1154,7 @@ int ObTableModifyOp::get_next_row_from_child()
|
||||
LOG_WARN("fail to get next row", K(ret));
|
||||
}
|
||||
} else {
|
||||
LOG_TRACE("child output row", "row", ROWEXPR2STR(eval_ctx_, child_->get_spec().output_));
|
||||
LOG_DEBUG("child output row", "row", ROWEXPR2STR(eval_ctx_, child_->get_spec().output_));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -679,7 +679,7 @@ int ObTempExpr::eval(ObExecContext &exec_ctx, const ObNewRow &row, ObObj &result
|
||||
if (!exec_ctx.use_temp_expr_ctx_cache()) {
|
||||
temp_expr_ctx->~ObTempExprCtx();
|
||||
}
|
||||
LOG_TRACE("temp expr result", K(result), K(row), K(rt_exprs_));
|
||||
LOG_DEBUG("temp expr result", K(result), K(row), K(rt_exprs_));
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@ -258,16 +258,6 @@ int ObExecContext::init_phy_op(const uint64_t phy_op_size)
|
||||
LOG_WARN("init operator kit store failed", K(ret));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_ISNULL(gi_task_map_)) {
|
||||
// Do nothing.
|
||||
} else if (gi_task_map_->created()) {
|
||||
// Do nothing. If this map has been created, it means this plan is trying to reopen.
|
||||
} else if (OB_FAIL(gi_task_map_->create(PARTITION_WISE_JOIN_TSC_HASH_BUCKET_NUM, /* assume no more than 8 table scan in a plan */
|
||||
ObModIds::OB_SQL_PX))) {
|
||||
LOG_WARN("create gi task map failed", K(ret));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -293,7 +293,7 @@ int ObOpSpec::create_operator(ObExecContext &exec_ctx, ObOperator *&op) const
|
||||
} else if (OB_FAIL(create_exec_feedback_node_recursive(exec_ctx))) {
|
||||
LOG_WARN("fail to create exec feedback node", K(ret));
|
||||
}
|
||||
LOG_TRACE("trace create operator", K(ret), K(lbt()));
|
||||
LOG_DEBUG("trace create operator", K(ret), K(lbt()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ int ObOpSpec::create_operator_recursive(ObExecContext &exec_ctx, ObOperator *&op
|
||||
K(ret), K(id_), KP(kit), KP(children_), K(create_child_cnt), K(type_));
|
||||
} else {
|
||||
kit->spec_ = this;
|
||||
LOG_TRACE("trace create spec", K(ret), K(id_), K(type_));
|
||||
LOG_DEBUG("trace create spec", K(ret), K(id_), K(type_));
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < child_cnt_; i++) {
|
||||
if (NULL == children_[i]) {
|
||||
// 这里如果有child但为nullptr,说明是receive算子
|
||||
@ -341,7 +341,7 @@ int ObOpSpec::create_operator_recursive(ObExecContext &exec_ctx, ObOperator *&op
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("NULL input returned", K(ret));
|
||||
} else {
|
||||
LOG_TRACE("trace create input", K(ret), K(id_), K(type_));
|
||||
LOG_DEBUG("trace create input", K(ret), K(id_), K(type_));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,7 +287,9 @@ struct AllocOpHelper
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_WARN("alloc memory failed", K(ret), K(alloc_size));
|
||||
} else {
|
||||
memset(mem, 0, sizeof(OpType *) * child_cnt);
|
||||
if (child_cnt > 0) {
|
||||
memset(mem, 0, sizeof(OpType *) * child_cnt);
|
||||
}
|
||||
op = new (&mem[child_cnt]) OpType(exec_ctx, spec, input);
|
||||
if (OB_FAIL(op->set_children_pointer(mem, child_cnt))
|
||||
|| OB_FAIL(op->init())) {
|
||||
|
||||
@ -160,7 +160,6 @@ void PxWorkerFunctor::operator ()(bool need_exec)
|
||||
ObPxSqcHandler *sqc_handler = task_arg_.get_sqc_handler();
|
||||
SQCHandlerGuard sqc_handler_guard(sqc_handler);
|
||||
lib::MemoryContext mem_context = nullptr;
|
||||
const bool enable_trace_log = lib::is_trace_log_enabled();
|
||||
//ensure PX worker skip updating timeout_ts_ by ntp offset
|
||||
THIS_WORKER.set_ntp_offset(0);
|
||||
if (!need_exec) {
|
||||
@ -185,7 +184,7 @@ void PxWorkerFunctor::operator ()(bool need_exec)
|
||||
if (OB_LOGGER.is_info_as_wdiag()) {
|
||||
ObThreadLogLevelUtils::clear();
|
||||
} else {
|
||||
if (OB_LOG_LEVEL_NONE != env_arg_.get_log_level() && enable_trace_log) {
|
||||
if (OB_LOG_LEVEL_NONE != env_arg_.get_log_level()) {
|
||||
ObThreadLogLevelUtils::init(env_arg_.get_log_level());
|
||||
}
|
||||
}
|
||||
@ -233,9 +232,7 @@ void PxWorkerFunctor::operator ()(bool need_exec)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (enable_trace_log) {
|
||||
ObThreadLogLevelUtils::clear();
|
||||
}
|
||||
ObThreadLogLevelUtils::clear();
|
||||
} else if (OB_ISNULL(sqc_handler)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_ERROR("Unexpected null sqc handler", K(sqc_handler));
|
||||
|
||||
@ -1235,7 +1235,7 @@ int ObTableScanOp::prepare_single_scan_range(int64_t group_idx)
|
||||
if (OB_SUCC(ret) && MY_SPEC.is_vt_mapping_) {
|
||||
OZ(vt_result_converter_->convert_key_ranges(MY_INPUT.key_ranges_));
|
||||
}
|
||||
LOG_TRACE("prepare single scan range", K(ret), K(key_ranges), K(MY_INPUT.key_ranges_),
|
||||
LOG_DEBUG("prepare single scan range", K(ret), K(key_ranges), K(MY_INPUT.key_ranges_),
|
||||
K(MY_INPUT.ss_key_ranges_));
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user