Skip to content

Commit 9ea17dd

Browse files
gridnevvvitssmike
andauthored
avoid changing shardstate reads list during iteration (#12150) (#12170)
Co-authored-by: Mikhail Surin <[email protected]>
1 parent 985ff54 commit 9ea17dd

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,16 @@ class TKqpStreamLookupActor : public NActors::TActorBootstrapped<TKqpStreamLooku
413413
auto shardIt = ReadsPerShard.find(tabletId);
414414
YQL_ENSURE(shardIt != ReadsPerShard.end());
415415

416+
TVector<TReadState*> toRetry;
416417
for (auto* read : shardIt->second.Reads) {
417418
if (read->State == EReadState::Running) {
418419
Counters->IteratorDeliveryProblems->Inc();
419-
RetryTableRead(*read);
420+
toRetry.push_back(read);
420421
}
421422
}
423+
for (auto* read : toRetry) {
424+
RetryTableRead(*read);
425+
}
422426
}
423427

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

0 commit comments

Comments
 (0)