Skip to content

Commit

Permalink
avoid changing shardstate reads list during iteration (#12150)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmike authored Nov 29, 2024
1 parent 1b51ba9 commit a4e7da0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,16 @@ class TKqpStreamLookupActor : public NActors::TActorBootstrapped<TKqpStreamLooku
auto shardIt = ReadsPerShard.find(tabletId);
YQL_ENSURE(shardIt != ReadsPerShard.end());

TVector<TReadState*> toRetry;
for (auto* read : shardIt->second.Reads) {
if (read->State == EReadState::Running) {
Counters->IteratorDeliveryProblems->Inc();
RetryTableRead(*read);
toRetry.push_back(read);
}
}
for (auto* read : toRetry) {
RetryTableRead(*read);
}
}

void Handle(TEvPrivate::TEvSchemeCacheRequestTimeout::TPtr&) {
Expand Down

0 comments on commit a4e7da0

Please sign in to comment.