mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #299 from ludv1x/METR-22224
Fixed race condition during dictionaries' config file update. [See discussion in ST!]
This commit is contained in:
commit
220c7f2b93
@ -210,11 +210,11 @@ void ExternalDictionaries::reloadFromFile(const std::string & config_path, const
|
||||
const auto last_modified = config_file.getLastModified();
|
||||
if (last_modified > config_last_modified)
|
||||
{
|
||||
Poco::AutoPtr<Poco::Util::XMLConfiguration> config = new Poco::Util::XMLConfiguration(config_path);
|
||||
|
||||
/// definitions of dictionaries may have changed, recreate all of them
|
||||
config_last_modified = last_modified;
|
||||
|
||||
Poco::AutoPtr<Poco::Util::XMLConfiguration> config = new Poco::Util::XMLConfiguration(config_path);
|
||||
|
||||
/// get all dictionaries' definitions
|
||||
Poco::Util::AbstractConfiguration::Keys keys;
|
||||
config->keys(keys);
|
||||
|
Loading…
Reference in New Issue
Block a user