diff options
author | Oleg Doronin <dorooleg@yandex.ru> | 2024-09-06 16:53:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 16:53:14 +0300 |
commit | 8c72783b41de368b2b8098d93da5bf1fadd3c45e (patch) | |
tree | 30d248dbe52ec40e596e68b3773303ea8d1acb96 | |
parent | d7c05c04aa02272facf82d09893c872673478d2d (diff) | |
download | ydb-8c72783b41de368b2b8098d93da5bf1fadd3c45e.tar.gz |
NodesManager cleanup (#8863)
-rw-r--r-- | ydb/core/fq/libs/actors/nodes_manager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ydb/core/fq/libs/actors/nodes_manager.cpp b/ydb/core/fq/libs/actors/nodes_manager.cpp index 83622fde3a..5e947599d1 100644 --- a/ydb/core/fq/libs/actors/nodes_manager.cpp +++ b/ydb/core/fq/libs/actors/nodes_manager.cpp @@ -145,7 +145,7 @@ private: TPeer node = {SelfId().NodeId(), InstanceId + "," + HostName(), 0, 0, 0, DataCenter}; bool selfPlacement = true; if (!Peers.empty()) { - auto FirstPeer = NextPeer; + auto firstPeer = NextPeer; while (true) { Y_ABORT_UNLESS(NextPeer < Peers.size()); auto& nextNode = Peers[NextPeer]; @@ -154,9 +154,9 @@ private: NextPeer = 0; } - if ( (!UseDataCenter || DataCenter.empty() || nextNode.DataCenter.empty() || DataCenter == nextNode.DataCenter) // non empty DC must match - && ( nextNode.MemoryLimit == 0 // memory is NOT limited - || nextNode.MemoryLimit >= nextNode.MemoryAllocated + totalMemoryLimit) // or enough + if ((!UseDataCenter || DataCenter.empty() || nextNode.DataCenter.empty() || DataCenter == nextNode.DataCenter) // non empty DC must match + && (nextNode.MemoryLimit == 0 // memory is NOT limited + || nextNode.MemoryLimit >= nextNode.MemoryAllocated + totalMemoryLimit) // or enough ) { // adjust allocated size to place next tasks correctly, will be reset after next health check nextNode.MemoryAllocated += totalMemoryLimit; @@ -169,7 +169,7 @@ private: break; } - if (NextPeer == FirstPeer) { // we closed loop w/o success, fallback to self placement then + if (NextPeer == firstPeer) { // we closed loop w/o success, fallback to self placement then break; } } |