Skip to content

Commit 0db71ba

Browse files
prevent timeout in case empty filter scan (#14925)
1 parent 89703a2 commit 0db71ba

File tree

1 file changed

+6
-7
lines changed
  • ydb/core/tx/columnshard/engines/reader/actor

1 file changed

+6
-7
lines changed

ydb/core/tx/columnshard/engines/reader/actor/actor.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace NKikimr::NOlap::NReader {
1010
constexpr TDuration SCAN_HARD_TIMEOUT = TDuration::Minutes(10);
1111
constexpr TDuration SCAN_HARD_TIMEOUT_GAP = TDuration::Seconds(5);
1212

13-
1413
void TColumnShardScan::PassAway() {
1514
Send(ResourceSubscribeActorId, new TEvents::TEvPoisonPill);
1615
Send(ReadCoordinatorActorId, new TEvents::TEvPoisonPill);
@@ -192,9 +191,6 @@ bool TColumnShardScan::ProduceResults() noexcept {
192191

193192
std::shared_ptr<TPartialReadResult> resultOpt = resultConclusion.DetachResult();
194193
if (!resultOpt) {
195-
if (!!AckReceivedInstant) {
196-
LastResultInstant = TMonotonic::Now();
197-
}
198194
ACFL_DEBUG("stage", "no data is ready yet")("iterator", ScanIterator->DebugString());
199195
return false;
200196
}
@@ -260,6 +256,9 @@ void TColumnShardScan::ContinueProcessing() {
260256
// Send new results if there is available capacity
261257
while (ScanIterator && ProduceResults()) {
262258
}
259+
if (!!AckReceivedInstant) {
260+
LastResultInstant = TMonotonic::Now();
261+
}
263262

264263
if (ScanIterator) {
265264
// Switch to the next range if the current one is finished
@@ -285,9 +284,9 @@ void TColumnShardScan::ContinueProcessing() {
285284
}
286285
}
287286
}
288-
AFL_VERIFY(!!FinishInstant || !ScanIterator || !ChunksLimiter.HasMore() || ScanCountersPool.InWaiting())("scan_actor_id", ScanActorId)("tx_id", TxId)(
289-
"scan_id", ScanId)("gen", ScanGen)("tablet", TabletId)(
290-
"debug", ScanIterator->DebugString())("counters", ScanCountersPool.DebugString());
287+
AFL_VERIFY(!!FinishInstant || !ScanIterator || !ChunksLimiter.HasMore() || ScanCountersPool.InWaiting())("scan_actor_id", ScanActorId)("tx_id", TxId)("scan_id", ScanId)(
288+
"gen", ScanGen)("tablet", TabletId)("debug", ScanIterator->DebugString())(
289+
"counters", ScanCountersPool.DebugString());
291290
}
292291

293292
void TColumnShardScan::MakeResult(size_t reserveRows /*= 0*/) {

0 commit comments

Comments
 (0)