diff options
author | Vasily Gerasimov <UgnineSirdis@gmail.com> | 2022-07-01 22:35:13 +0300 |
---|---|---|
committer | Vasily Gerasimov <UgnineSirdis@gmail.com> | 2022-07-01 22:35:13 +0300 |
commit | 9172a70c81c471c9706493ffab67979dd2dc9f1b (patch) | |
tree | 32071801880a37043e175f0ed5bdffda0b2de820 | |
parent | 4e6d666a7b5b37346e417970164b44887607106d (diff) | |
download | ydb-9172a70c81c471c9706493ffab67979dd2dc9f1b.tar.gz |
YQ-1210 Fix vector read overflow in nodes manager
Fix vector read overflow in nodes manager
ref:4fe9d9f81216315a927e67d7293bae06d94e099c
-rw-r--r-- | ydb/core/yq/libs/actors/nodes_manager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ydb/core/yq/libs/actors/nodes_manager.cpp b/ydb/core/yq/libs/actors/nodes_manager.cpp index 0e930e518d3..2b6b9dc974c 100644 --- a/ydb/core/yq/libs/actors/nodes_manager.cpp +++ b/ydb/core/yq/libs/actors/nodes_manager.cpp @@ -242,6 +242,9 @@ private: TNodeLocation(node.data_center())}); } } + if (NextPeer >= Peers.size()) { + NextPeer = 0; + } ServiceCounters.Counters->GetCounter("PeerCount", false)->Set(Peers.size()); ServiceCounters.Counters->GetCounter("NodesHealthCheckOk", true)->Inc(); |