Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-654: limiting the number of volume MetaHistory records displayed on volume monpage #859

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cloud/blockstore/config/storage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -948,4 +948,7 @@ message TStorageServiceConfig
// Timeout for attempts to acquire the shadow disk when writes to the source
// disk are not blocked (in ms).
optional uint32 MaxAcquireShadowDiskTotalTimeoutWhenNonBlocked = 358;

// Max number of volume MetaHistory records displayed on volume monpage.
optional uint32 VolumeMetaHistoryDisplayedRecordLimit = 359;
}
1 change: 1 addition & 0 deletions cloud/blockstore/libs/storage/core/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ TDuration MSeconds(ui32 value)
xxx(VolumeHistoryDuration, TDuration, Days(7) )\
xxx(VolumeHistoryCacheSize, ui32, 100 )\
xxx(DeletedCheckpointHistoryLifetime, TDuration, Days(7) )\
xxx(VolumeMetaHistoryDisplayedRecordLimit, ui32, 30 )\
\
xxx(BytesPerPartition, ui64, 512_TB )\
xxx(BytesPerPartitionSSD, ui64, 512_GB )\
Expand Down
1 change: 1 addition & 0 deletions cloud/blockstore/libs/storage/core/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ class TStorageConfig

TDuration GetVolumeHistoryDuration() const;
ui32 GetVolumeHistoryCacheSize() const;
ui32 GetVolumeMetaHistoryDisplayedRecordLimit() const;

ui64 GetBytesPerPartition() const;
ui64 GetBytesPerPartitionSSD() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,10 @@ void TVolumeActor::RenderHistory(
}
}
auto it = metaHistory.rbegin();
while (it != metaHistory.rend()) {
ui32 displayedCount = 0;
const ui32 limit =
Config->GetVolumeMetaHistoryDisplayedRecordLimit();
while (it != metaHistory.rend() && displayedCount < limit) {
const auto& item = *it;

TABLER() {
Expand All @@ -627,6 +630,7 @@ void TVolumeActor::RenderHistory(
}

++it;
++displayedCount;
}
}
}
Expand Down