Fix stupid mistake - max() -> min()

This commit is contained in:
Igor Nikonov 2023-01-05 12:37:25 +00:00
parent db46267a95
commit 2a105d1862

View File

@ -3783,9 +3783,9 @@ void MergeTreeData::delayInsertOrThrowIfNeeded(Poco::Event * until, ContextPtr q
}
const UInt64 max_delay_milliseconds = (settings->max_delay_to_insert > 0 ? settings->max_delay_to_insert * 1000 : 1000);
/// max() as a save guard here
/// min() as a save guard here
const UInt64 delay_milliseconds
= std::max(max_delay_milliseconds, static_cast<UInt64>(::pow(max_delay_milliseconds, static_cast<double>(k) / max_k)));
= std::min(max_delay_milliseconds, static_cast<UInt64>(::pow(max_delay_milliseconds, static_cast<double>(k) / max_k)));
ProfileEvents::increment(ProfileEvents::DelayedInserts);
ProfileEvents::increment(ProfileEvents::DelayedInsertsMilliseconds, delay_milliseconds);