#include #include #include namespace DB { /// Must not acquire Context lock in constructor to avoid possibility of deadlocks. ExternalDictionaries::ExternalDictionaries( std::unique_ptr config_repository, const Poco::Util::AbstractConfiguration & config, Context & context) : ExternalLoader(config, "external dictionary", &Logger::get("ExternalDictionaries")), context(context) { addConfigRepository(std::move(config_repository), {"dictionary", "name", "dictionaries_config"}); enableAsyncLoading(true); enablePeriodicUpdates(true); } ExternalLoader::LoadablePtr ExternalDictionaries::create( const std::string & name, const Poco::Util::AbstractConfiguration & config, const std::string & key_in_config) const { return DictionaryFactory::instance().create(name, config, key_in_config, context); } }