Skip to content

Commit fc6d425

Browse files
committed
return up-to-date node stats
1 parent 5db97d8 commit fc6d425

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ydb/core/mind/hive/hive_impl.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1955,16 +1955,18 @@ void THive::Handle(TEvHive::TEvRequestHiveDomainStats::TPtr& ev) {
19551955

19561956
void THive::Handle(TEvHive::TEvRequestHiveNodeStats::TPtr& ev) {
19571957
const auto& request(ev->Get()->Record);
1958+
TInstant now = TActivationContext::Now();
19581959
THolder<TEvHive::TEvResponseHiveNodeStats> response = MakeHolder<TEvHive::TEvResponseHiveNodeStats>();
19591960
auto& record = response->Record;
19601961
if (request.GetReturnExtendedTabletInfo()) {
19611962
record.SetExtendedTabletInfo(true);
19621963
}
19631964
for (auto it = Nodes.begin(); it != Nodes.end(); ++it) {
1964-
const TNodeInfo& node = it->second;
1965+
TNodeInfo& node = it->second;
19651966
if (node.IsUnknown()) {
19661967
continue;
19671968
}
1969+
node.ActualizeNodeStatistics(now);
19681970
auto& nodeStats = *record.AddNodeStats();
19691971
nodeStats.SetNodeId(node.Id);
19701972
if (!node.ServicedDomains.empty()) {

0 commit comments

Comments
 (0)