This is an automated email from the ASF dual-hosted git repository. gabriellee pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 00c73948136 branch-2.1: [fix](scanner) Delete meaningless finish dependency in schema scanner #44915 (#44963) 00c73948136 is described below commit 00c73948136651bc39e6ff26f48f7ad1e8b06826 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Wed Dec 4 13:16:08 2024 +0800 branch-2.1: [fix](scanner) Delete meaningless finish dependency in schema scanner #44915 (#44963) Cherry-picked from #44915 Co-authored-by: Gabriel <liwenqi...@selectdb.com> --- be/src/exec/schema_scanner.cpp | 4 ---- be/src/exec/schema_scanner.h | 7 +------ be/src/pipeline/exec/schema_scan_operator.cpp | 5 +---- be/src/pipeline/exec/schema_scan_operator.h | 5 ----- 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/be/src/exec/schema_scanner.cpp b/be/src/exec/schema_scanner.cpp index ce75c6d0cd1..6336abd7f0b 100644 --- a/be/src/exec/schema_scanner.cpp +++ b/be/src/exec/schema_scanner.cpp @@ -128,7 +128,6 @@ Status SchemaScanner::get_next_block_async(RuntimeState* state) { SCOPED_ATTACH_TASK(state); _dependency->block(); _async_thread_running = true; - _finish_dependency->block(); if (!_opened) { _data_block = vectorized::Block::create_unique(); _init_block(_data_block.get()); @@ -140,9 +139,6 @@ Status SchemaScanner::get_next_block_async(RuntimeState* state) { _eos = eos; _async_thread_running = false; _dependency->set_ready(); - if (eos) { - _finish_dependency->set_ready(); - } })); return Status::OK(); } diff --git a/be/src/exec/schema_scanner.h b/be/src/exec/schema_scanner.h index da61d58b943..35fc051511d 100644 --- a/be/src/exec/schema_scanner.h +++ b/be/src/exec/schema_scanner.h @@ -108,11 +108,7 @@ public: // factory function static std::unique_ptr<SchemaScanner> create(TSchemaTableType::type type); TSchemaTableType::type type() const { return _schema_table_type; } - void set_dependency(std::shared_ptr<pipeline::Dependency> dep, - std::shared_ptr<pipeline::Dependency> fin_dep) { - _dependency = dep; - _finish_dependency = fin_dep; - } + void set_dependency(std::shared_ptr<pipeline::Dependency> dep) { _dependency = dep; } Status get_next_block_async(RuntimeState* state); protected: @@ -141,7 +137,6 @@ protected: RuntimeProfile::Counter* _fill_block_timer = nullptr; std::shared_ptr<pipeline::Dependency> _dependency = nullptr; - std::shared_ptr<pipeline::Dependency> _finish_dependency = nullptr; std::unique_ptr<vectorized::Block> _data_block; AtomicStatus _scanner_status; diff --git a/be/src/pipeline/exec/schema_scan_operator.cpp b/be/src/pipeline/exec/schema_scan_operator.cpp index 73e54d52be2..53b05b55d35 100644 --- a/be/src/pipeline/exec/schema_scan_operator.cpp +++ b/be/src/pipeline/exec/schema_scan_operator.cpp @@ -61,7 +61,7 @@ Status SchemaScanLocalState::init(RuntimeState* state, LocalStateInfo& info) { // new one scanner _schema_scanner = SchemaScanner::create(schema_table->schema_table_type()); - _schema_scanner->set_dependency(_data_dependency, _finish_dependency); + _schema_scanner->set_dependency(_data_dependency); if (nullptr == _schema_scanner) { return Status::InternalError("schema scanner get nullptr pointer."); } @@ -285,9 +285,6 @@ Status SchemaScanOperatorX::get_block(RuntimeState* state, vectorized::Block* bl } while (block->rows() == 0 && !*eos); local_state.reached_limit(block, eos); - if (*eos) { - local_state._finish_dependency->set_always_ready(); - } return Status::OK(); } diff --git a/be/src/pipeline/exec/schema_scan_operator.h b/be/src/pipeline/exec/schema_scan_operator.h index c026c105e95..ba0ec2b865d 100644 --- a/be/src/pipeline/exec/schema_scan_operator.h +++ b/be/src/pipeline/exec/schema_scan_operator.h @@ -56,9 +56,6 @@ public: SchemaScanLocalState(RuntimeState* state, OperatorXBase* parent) : PipelineXLocalState<>(state, parent) { - _finish_dependency = - std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), - parent->get_name() + "_FINISH_DEPENDENCY", true); _data_dependency = std::make_shared<Dependency>(parent->operator_id(), parent->node_id(), parent->get_name() + "_DEPENDENCY", true); } @@ -68,7 +65,6 @@ public: Status open(RuntimeState* state) override; - Dependency* finishdependency() override { return _finish_dependency.get(); } std::vector<Dependency*> dependencies() const override { return {_data_dependency.get()}; } private: @@ -77,7 +73,6 @@ private: SchemaScannerParam _scanner_param; std::unique_ptr<SchemaScanner> _schema_scanner; - std::shared_ptr<Dependency> _finish_dependency; std::shared_ptr<Dependency> _data_dependency; }; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org