dbms: external dictionaries: fixed errors [#METR-17508].

This commit is contained in:
Alexey Milovidov 2015-08-12 07:21:10 +03:00
parent dea3c8b8a4
commit 18ed0b2829
6 changed files with 8 additions and 10 deletions

View File

@ -620,9 +620,9 @@ private:
mutable std::mt19937_64 rnd_engine{getSeed()};
mutable std::size_t bytes_allocated = 0;
mutable std::atomic<std::size_t> element_count{};
mutable std::atomic<std::size_t> hit_count{};
mutable std::atomic<std::size_t> query_count{};
mutable std::atomic<std::size_t> element_count{0};
mutable std::atomic<std::size_t> hit_count{0};
mutable std::atomic<std::size_t> query_count{0};
const std::chrono::time_point<std::chrono::system_clock> creation_time = std::chrono::system_clock::now();
};

View File

@ -361,7 +361,7 @@ private:
std::size_t bytes_allocated = 0;
std::size_t element_count = 0;
std::size_t bucket_count = 0;
mutable std::atomic<std::size_t> query_count;
mutable std::atomic<std::size_t> query_count{0};
std::chrono::time_point<std::chrono::system_clock> creation_time;

View File

@ -347,7 +347,7 @@ private:
std::size_t bytes_allocated = 0;
std::size_t element_count = 0;
std::size_t bucket_count = 0;
mutable std::atomic<std::size_t> query_count{};
mutable std::atomic<std::size_t> query_count{0};
std::chrono::time_point<std::chrono::system_clock> creation_time;

View File

@ -422,7 +422,7 @@ private:
std::size_t bytes_allocated = 0;
std::size_t element_count = 0;
std::size_t bucket_count = 0;
mutable std::atomic<std::size_t> query_count{};
mutable std::atomic<std::size_t> query_count{0};
std::chrono::time_point<std::chrono::system_clock> creation_time;

View File

@ -161,7 +161,7 @@ void ExternalDictionaries::reloadImpl(const bool throw_on_error)
{
dictionary.second.exception = std::current_exception();
tryLogCurrentException(log, "Cannot update external dictionary '" + name + "', leaving old version.");
tryLogCurrentException(log, "Cannot update external dictionary '" + name + "', leaving old version");
}
}
}

View File

@ -13,10 +13,8 @@ PoolWithFailover::PoolWithFailover(const Poco::Util::AbstractConfiguration & cfg
cfg.keys(config_name, replica_keys);
for (Poco::Util::AbstractConfiguration::Keys::const_iterator it = replica_keys.begin(); it != replica_keys.end(); ++it)
{
if (!(*it == "port" || *it == "user" || *it == "password" || *it == "db" || *it == "table"))
if (*it == "replica") /// На том же уровне могут быть другие параметры.
{
if (it->size() < std::string("replica").size() || it->substr(0, std::string("replica").size()) != "replica")
throw Poco::Exception("Unknown element in config: " + *it + ", expected replica");
std::string replica_name = config_name + "." + *it;
Replica replica(new Pool(cfg, replica_name, default_connections, max_connections, config_name.c_str()),
cfg.getInt(replica_name + ".priority", 0));