-
Notifications
You must be signed in to change notification settings - Fork 591
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
feat(storage): add metrics for compaction result check #14860
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ pub struct CompactorMetrics { | |
pub sstable_distinct_epoch_count: Histogram, | ||
pub compaction_event_consumed_latency: Histogram, | ||
pub compaction_event_loop_iteration_latency: Histogram, | ||
pub compaction_result_check_count: GenericCounterVec<AtomicU64>, | ||
} | ||
|
||
pub static GLOBAL_COMPACTOR_METRICS: LazyLock<CompactorMetrics> = | ||
|
@@ -250,7 +251,13 @@ impl CompactorMetrics { | |
); | ||
let compaction_event_loop_iteration_latency = | ||
register_histogram_with_registry!(opts, registry).unwrap(); | ||
|
||
let compaction_result_check_count = register_int_counter_vec_with_registry!( | ||
"storage_compaction_result_check_count", | ||
"KBs read from current level during history compactions to next level", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description should be modified accordingly. |
||
&["type"], | ||
registry | ||
) | ||
.unwrap(); | ||
Self { | ||
compaction_upload_sst_counts, | ||
compact_fast_runner_bytes, | ||
|
@@ -277,6 +284,7 @@ impl CompactorMetrics { | |
sstable_distinct_epoch_count, | ||
compaction_event_consumed_latency, | ||
compaction_event_loop_iteration_latency, | ||
compaction_result_check_count, | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a metric to record failure happen in the check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in shared_buffer_compact.rs L269