Skip to content
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 remote_url_allow_hosts after config update. #35294

Merged
merged 2 commits into from
Mar 15, 2022

Conversation

KochetovNicolai
Copy link
Member

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Reload remote_url_allow_hosts after config update.

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Mar 15, 2022
Comment on lines 38 to 39
std::lock_guard guard(hosts_mutex);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary also to run

primary_hosts.clear()
regexp_hosts.clear()

before adding the new entries? Otherwise previous configuration is retained in the list?
I assume the lock will make sure checkForDirectEntry won't be executed concurrently while the lists are updated, and thus might execute against empty lists then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, indeed, thank you!

Copy link
Contributor

@mdonkers mdonkers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@KochetovNicolai KochetovNicolai merged commit a380aa6 into master Mar 15, 2022
@KochetovNicolai KochetovNicolai deleted the reload-remote_url_allow_hosts branch March 15, 2022 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants