Avoid herd effect in ReplicatedMergeTreeCleanupThread (continued) [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-04-06 22:44:55 +03:00
parent e240712ec2
commit ee7fe63b69
2 changed files with 3 additions and 3 deletions

2
contrib/poco vendored

@ -1 +1 @@
Subproject commit 930a7ec1154f4f9711edfb4b4a39f9fff2a5bbb5
Subproject commit a107b0c9cee109fe0abfbf509df3c78a1e0c05fa

View File

@ -27,8 +27,8 @@ void ReplicatedMergeTreeCleanupThread::run()
{
setThreadName("ReplMTCleanup");
const auto CLEANUP_SLEEP_MS = (storage.data.settings.cleanup_delay_period
+ std::uniform_int_distribution<UInt64>(0, storage.data.settings.cleanup_delay_period_random_add)(rng)) * 1000;
const auto CLEANUP_SLEEP_MS = storage.data.settings.cleanup_delay_period * 1000
+ std::uniform_int_distribution<UInt64>(0, storage.data.settings.cleanup_delay_period_random_add * 1000)(rng);
while (!storage.shutdown_called)
{