This is an automated email from the ASF dual-hosted git repository. mrhhsg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new b3cf20b26e5 [debug](pipeline) add debug point of 'Pipeline::return_empty_block' (#37629) b3cf20b26e5 is described below commit b3cf20b26e5959c870d2a2f019430e6480d9a545 Author: Jerry Hu <mrh...@gmail.com> AuthorDate: Thu Jul 11 16:10:13 2024 +0800 [debug](pipeline) add debug point of 'Pipeline::return_empty_block' (#37629) --- be/src/pipeline/exec/operator.cpp | 17 +++++++++++++++-- be/src/pipeline/exec/operator.h | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/be/src/pipeline/exec/operator.cpp b/be/src/pipeline/exec/operator.cpp index 141eb1eaf59..ba3602a91cb 100644 --- a/be/src/pipeline/exec/operator.cpp +++ b/be/src/pipeline/exec/operator.cpp @@ -310,11 +310,24 @@ Status OperatorXBase::do_projections(RuntimeState* state, vectorized::Block* ori Status OperatorXBase::get_block_after_projects(RuntimeState* state, vectorized::Block* block, bool* eos) { - auto local_state = state->get_local_state(operator_id()); + DBUG_EXECUTE_IF("Pipeline::return_empty_block", { + if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" || + this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" || + this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" || + this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") { + if (_debug_point_count++ % 2 == 0) { + return Status::OK(); + } + } + }); + + auto* local_state = state->get_local_state(operator_id()); if (_output_row_descriptor) { local_state->clear_origin_block(); auto status = get_block(state, &local_state->_origin_block, eos); - if (UNLIKELY(!status.ok())) return status; + if (UNLIKELY(!status.ok())) { + return status; + } return do_projections(state, &local_state->_origin_block, block); } local_state->_peak_memory_usage_counter->set(local_state->_mem_tracker->peak_consumption()); diff --git a/be/src/pipeline/exec/operator.h b/be/src/pipeline/exec/operator.h index 38b0b892f2f..8abf7ab31da 100644 --- a/be/src/pipeline/exec/operator.h +++ b/be/src/pipeline/exec/operator.h @@ -771,6 +771,8 @@ protected: int64_t _limit; // -1: no limit + uint32_t _debug_point_count = 0; + std::string _op_name; bool _ignore_data_distribution = false; int _parallel_tasks = 0; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org