diff options
author | Mikhail Surin <ssmike@ydb.tech> | 2024-11-29 22:04:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-29 22:04:48 +0300 |
commit | a4e7da0f9a7c354bcdabaf6e2f4c38d956aed7d6 (patch) | |
tree | 67a20b18d068cc974c8d6d380e8f212194c4bf79 | |
parent | 1b51ba97193c30e07e53536bd8f0e587b3335dc7 (diff) | |
download | ydb-a4e7da0f9a7c354bcdabaf6e2f4c38d956aed7d6.tar.gz |
avoid changing shardstate reads list during iteration (#12150)
-rw-r--r-- | ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp b/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp index 694f5159f3..bf917fbb17 100644 --- a/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp +++ b/ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp @@ -413,12 +413,16 @@ private: 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&) { |