mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix overflow in StorageWindowView
This commit is contained in:
parent
bebed0598d
commit
d66aedf3db
@ -1068,9 +1068,10 @@ void StorageWindowView::threadFuncFireProc()
|
||||
if (max_watermark >= timestamp_now)
|
||||
clean_cache_task->schedule();
|
||||
|
||||
UInt64 next_fire_ms = static_cast<UInt64>(next_fire_signal) * 1000;
|
||||
UInt64 timestamp_ms = static_cast<UInt64>(Poco::Timestamp().epochMicroseconds()) / 1000;
|
||||
if (!shutdown_called)
|
||||
fire_task->scheduleAfter(std::max(UInt64(0), static_cast<UInt64>(next_fire_signal) * 1000 - timestamp_ms));
|
||||
fire_task->scheduleAfter(std::max(UInt64(0), next_fire_ms - std::min(next_fire_ms, timestamp_ms)));
|
||||
}
|
||||
|
||||
void StorageWindowView::threadFuncFireEvent()
|
||||
|
Loading…
Reference in New Issue
Block a user