Skip to content

Commit

Permalink
remove peer info from public api
Browse files Browse the repository at this point in the history
  • Loading branch information
StekPerepolnen committed Jul 4, 2024
1 parent d684c1e commit 34f2be1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
10 changes: 4 additions & 6 deletions ydb/core/health_check/health_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,17 +1304,15 @@ class TSelfCheckRequest : public TActorBootstrapped<TSelfCheckRequest> {
status = Ydb::Monitoring::StatusFlag::GREEN;
}

computeNodeStatus.mutable_max_time_difference()->set_peer(ToString(peerId));
computeNodeStatus.mutable_max_time_difference()->set_difference_ms(timeDifferenceDuration.MilliSeconds());
computeNodeStatus.set_overall(status);

if (databaseState.MaxTimeDifferenceNodeId == nodeId) {
TSelfCheckContext tdContext(&context, "NODES_TIME_DIFFERENCE");
FillNodeInfo(peerId, tdContext.Location.mutable_compute()->mutable_peer());
if (status == Ydb::Monitoring::StatusFlag::GREEN) {
tdContext.ReportStatus(status);
} else {
tdContext.ReportStatus(status, TStringBuilder() << "The nodes have a time difference of " << timeDifferenceDuration.MilliSeconds() << " ms", ETags::SyncState);
tdContext.ReportStatus(status, TStringBuilder() << "Node is "
<< timeDifferenceDuration.MilliSeconds() << " ms "
<< (timeDifferenceUs > 0 ? "behind " : "ahead of ")
<< "peer [" << peerId << "]", ETags::SyncState);
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions ydb/public/api/protos/ydb_monitoring.proto
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,12 @@ message LoadAverageStatus {
uint32 cores = 3;
}

message TimeDifferenceStatus {
StatusFlag.Status overall = 1;
int64 difference_ms = 2;
string peer = 3;
}

message ComputeNodeStatus {
string id = 1;
StatusFlag.Status overall = 2;
repeated ComputeTabletStatus tablets = 3;
repeated ThreadPoolStatus pools = 4;
LoadAverageStatus load = 5;
TimeDifferenceStatus max_time_difference = 6;
}

message ComputeStatus {
Expand Down Expand Up @@ -172,7 +165,6 @@ message LocationCompute {
LocationNode node = 1;
LocationComputePool pool = 2;
LocationComputeTablet tablet = 3;
LocationNode peer = 4;
}

message LocationDatabase {
Expand Down

0 comments on commit 34f2be1

Please sign in to comment.