Skip to content

Commit 05cc35d

Browse files
authored
prioritise nodes with tablets on initial ping (#5654)
1 parent 82687fa commit 05cc35d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ydb/core/mind/hive/hive_impl.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,11 +481,20 @@ void THive::Handle(TEvPrivate::TEvBootTablets::TPtr&) {
481481
SignalTabletActive(DEPRECATED_CTX);
482482
ReadyForConnections = true;
483483
RequestPoolsInformation();
484+
std::vector<TNodeInfo*> unimportantNodes; // ping nodes with tablets first
485+
unimportantNodes.reserve(Nodes.size());
484486
for (auto& [id, node] : Nodes) {
485487
if (node.IsUnknown() && node.Local) {
486-
node.Ping();
488+
if (node.GetTabletsTotal() > 0) {
489+
node.Ping();
490+
} else {
491+
unimportantNodes.push_back(&node);
492+
}
487493
}
488494
}
495+
for (auto* node : unimportantNodes) {
496+
node->Ping();
497+
}
489498
TVector<TTabletId> tabletsToReleaseFromParent;
490499
TSideEffects sideEffects;
491500
sideEffects.Reset(SelfId());

0 commit comments

Comments
 (0)