diff options
author | vporyadke <zalyalov@ydb.tech> | 2024-06-18 10:11:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 10:11:46 +0200 |
commit | 05cc35d98bf2bd929c00b02fcd98fd65a1b676ad (patch) | |
tree | 52030c8f9c1fa693d99a23699fb9809545f5f122 | |
parent | 82687fa128f0ac3fd261815b98d88cbbc426e2ab (diff) | |
download | ydb-05cc35d98bf2bd929c00b02fcd98fd65a1b676ad.tar.gz |
prioritise nodes with tablets on initial ping (#5654)
-rw-r--r-- | ydb/core/mind/hive/hive_impl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ydb/core/mind/hive/hive_impl.cpp b/ydb/core/mind/hive/hive_impl.cpp index fe7bd3b241..c467692fb9 100644 --- a/ydb/core/mind/hive/hive_impl.cpp +++ b/ydb/core/mind/hive/hive_impl.cpp @@ -481,11 +481,20 @@ void THive::Handle(TEvPrivate::TEvBootTablets::TPtr&) { SignalTabletActive(DEPRECATED_CTX); ReadyForConnections = true; RequestPoolsInformation(); + std::vector<TNodeInfo*> unimportantNodes; // ping nodes with tablets first + unimportantNodes.reserve(Nodes.size()); for (auto& [id, node] : Nodes) { if (node.IsUnknown() && node.Local) { - node.Ping(); + if (node.GetTabletsTotal() > 0) { + node.Ping(); + } else { + unimportantNodes.push_back(&node); + } } } + for (auto* node : unimportantNodes) { + node->Ping(); + } TVector<TTabletId> tabletsToReleaseFromParent; TSideEffects sideEffects; sideEffects.Reset(SelfId()); |