Skip to content

Commit 073ede0

Browse files
committed
Fix BSC VDisk metrics unknown fields exchange
1 parent 87e0715 commit 073ede0

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ namespace NKikimr {
9999
}
100100
ctx.Send(*SkeletonFrontIDPtr, ev.release());
101101
// send VDisk's metric to NodeWarden
102+
const bool enableThrottlingReport = AppData()->FeatureFlags.GetEnableThrottlingReport();
102103
ctx.Send(NodeWardenServiceId,
103104
new TEvBlobStorage::TEvControllerUpdateDiskStatus(
104105
SelfVDiskId,
@@ -109,8 +110,8 @@ namespace NKikimr {
109110
state,
110111
replicated,
111112
outOfSpaceFlags,
112-
OverloadHandler ? OverloadHandler->IsThrottling() : false,
113-
OverloadHandler ? OverloadHandler->GetThrottlingRate() : 0));
113+
enableThrottlingReport ? std::make_optional(OverloadHandler ? OverloadHandler->IsThrottling() : false) : std::nullopt,
114+
enableThrottlingReport ? std::make_optional(OverloadHandler ? OverloadHandler->GetThrottlingRate() : 0) : std::nullopt));
114115
// repeat later
115116
ctx.Schedule(Config->WhiteboardUpdateInterval, new TEvTimeToUpdateWhiteboard());
116117
}

ydb/core/mind/bscontroller/impl.h

+1
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ class TBlobStorageController : public TActor<TBlobStorageController>, public TTa
286286
const ui64 allocatedSizeBefore = Metrics.GetAllocatedSize();
287287
const ui32 prevStatusFlags = Metrics.GetStatusFlags();
288288
Metrics.MergeFrom(vDiskMetrics);
289+
Metrics.DiscardUnknownFields();
289290
MetricsDirty = true;
290291
UpdateVDiskMetrics();
291292
*allocatedSizeIncrementPtr = Metrics.GetAllocatedSize() - allocatedSizeBefore;

ydb/core/protos/feature_flags.proto

+1
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,5 @@ message TFeatureFlags {
207207
optional bool EnableEncryptedExport = 181 [default = false];
208208
optional bool EnableAlterDatabase = 182 [default = false];
209209
optional bool EnableExportAutoDropping = 183 [default = false];
210+
optional bool EnableThrottlingReport = 184 [default = false];
210211
}

0 commit comments

Comments
 (0)