-
Notifications
You must be signed in to change notification settings - Fork 781
feat: support external history tables #18194
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
base: main
Are you sure you want to change the base?
Conversation
This PR support Internal history table automatically convert to External history table based on config. It will drop the old tables and create new. However, for External to Internal, and different External storage config, it will return error and exit
|
892158a
to
5637ee8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for configuring external storage for history tables, enabling the conversion of internal history tables to external ones while providing the necessary tests and updated logic.
- Implements external history table support via new configuration and connection handling in the query service.
- Adds new tests and scripts to validate both internal and external history table behaviors.
- Updates various modules (meta, global history log, alter table, external storage connection) to support the external storage configuration.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/logging/test-logs.sh | Removed redundant log table check to fit with new external config. |
tests/logging/test-history-tables.sh | Added tests for external history tables. |
tests/logging/history_table_external.toml | New config file for external history table definition. |
src/query/service/src/history_tables/meta.rs | Added asynchronous semaphore acquisition helper. |
src/query/service/src/history_tables/global_history_log.rs | Extended prepare logic to support external storage and reset checks. |
src/query/service/src/history_tables/external.rs | New module for external storage connection and URI generation. |
src/query/service/src/history_tables/alter_table.rs | Updated table alteration and reset checks for external configuration. |
src/common/tracing/src/predefined_tables/* | Minor updates to export new functions. |
src/binaries/query/entry.rs | Updated initialization error handling for history tables. |
.github/actions/test_logs/action.yml | Enhanced CI action to setup and test external storage configurations. |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
close: #18146
follow up: #18185
allow to configure storage for history tables
Configuration:
Note:
When the storage config is change, the old tables will be dropped.
Tests
Type of change
This change is