-
Notifications
You must be signed in to change notification settings - Fork 625
Add support for replicated ClickHouse setups #2895
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From our discussion:
|
Note: we need a |
…viraj/handle-replicated-clickhouse
Aaron1011
previously approved these changes
Aug 6, 2025
Aaron1011
previously approved these changes
Aug 6, 2025
Aaron1011
previously approved these changes
Aug 6, 2025
Aaron1011
approved these changes
Aug 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR:
docker-compose.replicated.yml
.Replicated{normal table name}({keeper_path}, {replica_name}, ... other args to table engine)
. I added helper functions for each of these but they still rely on string formatting by the query writer. I didn't want to add too many layers of abstraction in the migration writing but am open to suggestions on how to improve.Changes to gateway configuration:
TENSORZERO_CLICKHOUSE_CLUSTER_NAME
that if set will get the gateway to use that cluster for replicated operations.We cannot run concurrent migrations with replicated tables so I introduce a
gateway --run-migrations-only
CLI command that does that for concurrent migrations. If the database is replicated but the migrations haven't been run it will error on startup.This PR closes #2228
Important
Add support for replicated ClickHouse setups with migration management and testing enhancements.
migration_manager
by introducingON CLUSTER
syntax andReplicated
table engines.--run-migrations-only
CLI command for manual migration execution in replicated setups.TENSORZERO_CLICKHOUSE_CLUSTER_NAME
environment variable for cluster configuration.docker-compose.replicated.yml
for setting up a replicated ClickHouse environment.replicated_clickhouse_config
.inference.rs
andhowdy.rs
to validate replicated ClickHouse functionality.This description was created by
for e20739e. You can customize this summary. It will automatically update as commits are pushed.