Skip to content

Commit 502e299

Browse files
ssmikezinal
authored andcommitted
avoid changing shardstate reads list during iteration (ydb-platform#12150)
1 parent 5ca2708 commit 502e299

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,16 @@ class TKqpStreamLookupActor : public NActors::TActorBootstrapped<TKqpStreamLooku
397397
auto shardIt = ReadsPerShard.find(tabletId);
398398
YQL_ENSURE(shardIt != ReadsPerShard.end());
399399

400+
TVector<TReadState*> toRetry;
400401
for (auto* read : shardIt->second.Reads) {
401402
if (read->State == EReadState::Running) {
402403
Counters->IteratorDeliveryProblems->Inc();
403-
RetryTableRead(*read);
404+
toRetry.push_back(read);
404405
}
405406
}
407+
for (auto* read : toRetry) {
408+
RetryTableRead(*read);
409+
}
406410
}
407411

408412
void Handle(TEvPrivate::TEvSchemeCacheRequestTimeout::TPtr&) {

0 commit comments

Comments
 (0)