From 34f2be1a008ca4424086a0ebe851945f6b7ca051 Mon Sep 17 00:00:00 2001 From: StekPerepolnen Date: Thu, 4 Jul 2024 23:35:37 +0000 Subject: [PATCH] remove peer info from public api --- ydb/core/health_check/health_check.cpp | 10 ++++------ ydb/public/api/protos/ydb_monitoring.proto | 8 -------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/ydb/core/health_check/health_check.cpp b/ydb/core/health_check/health_check.cpp index 3cf581d31aab..7ca1cb14e2f7 100644 --- a/ydb/core/health_check/health_check.cpp +++ b/ydb/core/health_check/health_check.cpp @@ -1304,17 +1304,15 @@ class TSelfCheckRequest : public TActorBootstrapped { 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); } } } diff --git a/ydb/public/api/protos/ydb_monitoring.proto b/ydb/public/api/protos/ydb_monitoring.proto index 67b30f28c3fb..d58cd6c9988f 100644 --- a/ydb/public/api/protos/ydb_monitoring.proto +++ b/ydb/public/api/protos/ydb_monitoring.proto @@ -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 { @@ -172,7 +165,6 @@ message LocationCompute { LocationNode node = 1; LocationComputePool pool = 2; LocationComputeTablet tablet = 3; - LocationNode peer = 4; } message LocationDatabase {