Skip to content

Commit

Permalink
prioritise nodes with tablets on initial ping (#5654) (#6381)
Browse files Browse the repository at this point in the history
  • Loading branch information
vporyadke authored Jul 8, 2024
1 parent 98858b7 commit 979d449
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ydb/core/mind/hive/hive_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 979d449

Please sign in to comment.