-
Notifications
You must be signed in to change notification settings - Fork 981
[WIP] ch cluster+replica+ha #7084
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
Conversation
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 ClickHouse cluster support with database and table creation scripts. The changes focus on three main areas: configuring cluster-specific settings, cleaning up excessive debug logging in the API, and handling cluster mode for mutation validation.
Key Changes:
- Added comprehensive ClickHouse cluster configuration options including replication, distributed writes, and parallel replicas
- Modified mutation manager to detect cluster mode and validate against
_localtables when appropriate - Removed extensive console.log debug statements from API startup, replacing with proper log calls
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| api/jobs/mutationManagerJob.js | Added ClusterManager integration to handle validation table naming in cluster mode |
| api/configextender.js | Added documentation comment explaining ClickHouse configuration override mechanism |
| api/config.sample.js | Introduced cluster, replication, parallelReplicas, distributed, dictionary, and identity configuration sections |
| api/api.js | Cleaned up debug console.log statements and replaced with proper log calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let validationTable = task.collection; | ||
| if (ClusterManager) { | ||
| try { | ||
| const cm = new ClusterManager(countlyConfig.clickhouse || {}); |
Copilot
AI
Dec 16, 2025
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.
Creating a new ClusterManager instance for every task in the loop is inefficient. Consider instantiating ClusterManager once before the loop and reusing it, or caching the cluster mode determination result.
feat: add database parameter to mutation manager job query execution
[fix] user profile tests
fix: db validation in mutation manager job
…development start scripts
…nto uj/ch-cluster
… support