-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
reload auxiliary zookeepers configuration #16627
Conversation
ba0cf1c
to
f176173
Compare
e637a0d
to
728bf90
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.
I think we should make this code more consistent with "main" ZooKeeper.
src/Interpreters/Context.cpp
Outdated
{ | ||
if (!zk || zk->configChanged(*config, config_name)) | ||
zk = std::make_shared<zkutil::ZooKeeper>(*config, config_name); | ||
if (zk->expired()) |
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.
But how we can get into this branch? Seems like this logic is not consistent with function name?
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.
Still don't understand why we need it.
programs/server/Server.cpp
Outdated
@@ -555,6 +555,7 @@ int Server::main(const std::vector<std::string> & /*args*/) | |||
global_context->setClustersConfig(config); | |||
global_context->setMacros(std::make_unique<Macros>(*config, "macros", log)); | |||
global_context->setExternalAuthenticatorsConfig(*config); | |||
global_context->setAuxiliaryZooKeepersConfig(config); |
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.
I think we should consistent with the main "zookeeper" config logic: https://github.com/ClickHouse/ClickHouse/pull/16627/files#diff-330af1a9f5e0bc78a4831acfc2b01918e1a906d8d4d95ec22f8434dd1c0b4743R567-R568. So instead of setAuxiliaryZooKeepersConfig
it's will be better to add reloadAuxiliaryZooKeeperIfChanged
.
And what should we do? |
src/Interpreters/Context.cpp
Outdated
{ | ||
if (!zk || zk->configChanged(*config, config_name)) | ||
zk = std::make_shared<zkutil::ZooKeeper>(*config, config_name); | ||
if (zk->expired()) |
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.
Still don't understand why we need it.
Test failures are not related to changes. Need to fix integration tests... |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Now,
<auxiliary_zookeepers>
configuration can be changed inconfig.xml
and reloaded without server startup.