Skip to content

Commit 5635e2b

Browse files
authored
[cms] add start_time in public cms maintenance api (#2452) (#2472)
1 parent a607285 commit 5635e2b

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

ydb/core/cms/api_adapters.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ class TListClusterNodes: public TAdapterActor<
163163
out.set_host(in.Host);
164164
out.set_port(in.IcPort);
165165
out.set_state(ConvertNodeState(in.State));
166+
*out.mutable_start_time() = TimeUtil::MicrosecondsToTimestamp(in.StartTime.GetValue());
166167

167168
auto& location = *out.mutable_location();
168169
location.set_data_center(in.Location.GetDataCenterId());

ydb/core/cms/cms.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,7 @@ void TCms::AddHostState(const TClusterInfoPtr &clusterInfo, const TNodeInfo &nod
11601160
host->SetNodeId(node.NodeId);
11611161
host->SetInterconnectPort(node.IcPort);
11621162
host->SetTimestamp(timestamp.GetValue());
1163+
host->SetStartTimeSeconds(node.StartTime.Seconds());
11631164
node.Location.Serialize(host->MutableLocation(), false);
11641165
for (auto marker : node.Markers) {
11651166
host->AddMarkers(marker);

ydb/core/protos/cms.proto

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ message THostState {
7777
optional uint32 InterconnectPort = 7;
7878
repeated EMarker Markers = 8;
7979
optional NActorsInterconnect.TNodeLocation Location = 9;
80+
optional uint32 StartTimeSeconds = 10;
8081
}
8182

8283
message TClusterState {

ydb/public/api/protos/draft/ydb_maintenance.proto

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ message Node {
4141
StorageNode storage = 6;
4242
DynamicNode dynamic = 7;
4343
}
44+
// start_time defines time when node was registered in cms.
45+
google.protobuf.Timestamp start_time = 8;
4446
}
4547

4648
message ListClusterNodesRequest {

0 commit comments

Comments
 (0)