-
Notifications
You must be signed in to change notification settings - Fork 177
PMM-13812 Clickhouse cluster support. #4535
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: v3
Are you sure you want to change the base?
Conversation
) | ||
|
||
func main() { | ||
data := map[string]map[string]any{ |
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.
Main is used for generate sql files for our tests.
|
||
const ( | ||
databaseEngineSimple = "MergeTree" | ||
databaseEngineCluster = "ReplicatedMergeTree('/clickhouse/tables/{shard}/metrics', '{replica}')" |
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.
No need to replace placeholders ({shard} and {replica}). It is working anyway.
"github.com/sirupsen/logrus" | ||
) | ||
|
||
type memMigration struct { |
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.
It is enough to keep rendered migrations in memory. No need to save them into file.
docker run -d --platform=linux/amd64 --name pmm-clickhouse-test -p19000:9000 -p18123:8123 clickhouse/clickhouse-server:23.8.2.7 | ||
make test-env | ||
|
||
test-env-up-apple: ## Start docker containers used for testing on Apple chips |
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.
Not needed anymore. Original image is now compatible with Apple silicon.
The PR introduces dynamic (template-generated) SQL migrations, allowing the ENGINE type to be changed based on the setup. I wanted to avoid adding more static files for cluster setups, as this approach is more future-proof. |
PMM-13812
FB: Percona-Lab/pmm-submodules#4047