Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.9k
[Improvement](schema scan) Use async scanner for schema scanners#38403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -22,6 +22,7 @@ | ||
| #include <stddef.h> | ||
| #include <stdint.h> | ||
| #include <condition_variable> | ||
| #include <memory> | ||
| #include <string> | ||
| #include <vector> | ||
| @@ -43,6 +44,10 @@ namespace vectorized { | ||
| class Block; | ||
| } | ||
| namespace pipeline { | ||
| class Dependency; | ||
| } | ||
| struct SchemaScannerCommonParam { | ||
| SchemaScannerCommonParam() | ||
| : db(nullptr), | ||
| @@ -94,15 +99,23 @@ class SchemaScanner { | ||
| // init object need information, schema etc. | ||
| virtual Status init(SchemaScannerParam* param, ObjectPool* pool); | ||
| Status get_next_block(RuntimeState* state, vectorized::Block* block, bool* eos); | ||
| // Start to work | ||
| virtual Status start(RuntimeState* state); | ||
| virtual Status get_next_block(vectorized::Block* block, bool* eos); | ||
| virtual Status get_next_block_internal(vectorized::Block* block, bool* eos); | ||
| const std::vector<ColumnDesc>& get_column_desc() const { return _columns; } | ||
| // 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; | ||
| } | ||
| Status get_next_block_async(RuntimeState* state); | ||
| protected: | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. schema scanner | ||
| void _init_block(vectorized::Block* src_block); | ||
| Status fill_dest_column_for_range(vectorized::Block* block, size_t pos, | ||
| const std::vector<void*>& datas); | ||
| @@ -125,6 +138,15 @@ class SchemaScanner { | ||
| RuntimeProfile::Counter* _get_table_timer = nullptr; | ||
| RuntimeProfile::Counter* _get_describe_timer = nullptr; | ||
| 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; | ||
| std::atomic<bool> _eos = false; | ||
| std::atomic<bool> _opened = false; | ||
| std::atomic<bool> _async_thread_running = false; | ||
| }; | ||
| } // namespace doris | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.