mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
IProfilingBlockInputStream: check limits before reading block
This makes one pointless check before the first block is read, but is necessary to prevent reading blocks from storages like Kafka where messages are read only once.
This commit is contained in:
parent
90aa544573
commit
ad59a1460e
@ -38,6 +38,9 @@ Block IProfilingBlockInputStream::read()
|
||||
if (is_cancelled.load(std::memory_order_seq_cst))
|
||||
return res;
|
||||
|
||||
if (!checkLimits())
|
||||
limit_exceeded_need_break = true;
|
||||
|
||||
if (!limit_exceeded_need_break)
|
||||
res = readImpl();
|
||||
|
||||
@ -48,9 +51,6 @@ Block IProfilingBlockInputStream::read()
|
||||
if (enabled_extremes)
|
||||
updateExtremes(res);
|
||||
|
||||
if (!checkLimits())
|
||||
limit_exceeded_need_break = true;
|
||||
|
||||
if (quota != nullptr)
|
||||
checkQuota(res);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user