Skip to content

Commit

Permalink
fix(storage): fix lock time metrics (#16054)
Browse files Browse the repository at this point in the history
  • Loading branch information
Li0k authored Apr 9, 2024
1 parent 6f360ce commit ed75502
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-user-dashboard.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions grafana/risingwave-dev-dashboard.dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -2718,9 +2718,9 @@ def section_hummock_manager(outer_panels):
[
*quantile(
lambda quantile, legend: panels.target(
f"histogram_quantile({quantile}, sum(rate({metric('hummock_manager_lock_time_bucket')}[$__rate_interval])) by (le, lock_name, lock_type))",
f"histogram_quantile({quantile}, sum(rate({metric('hummock_manager_lock_time_bucket')}[$__rate_interval])) by (le, method, lock_name, lock_type))",
f"Lock Time p{legend}"
+ " - {{lock_type}} @ {{lock_name}}",
+ " - {{method}} @ {{lock_type}} @ {{lock_name}}",
),
[50, 99, "max"],
),
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion grafana/risingwave-user-dashboard.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/meta/src/hummock/manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,8 @@ impl HummockManager {
let mut versioning_guard = write_lock!(self, versioning).await;
let versioning = versioning_guard.deref_mut();

let _timer = start_measure_real_process_timer!(self);

let mut current_version = versioning.current_version.clone();
let start_time = Instant::now();
let max_committed_epoch = current_version.max_committed_epoch;
Expand Down Expand Up @@ -1402,6 +1404,8 @@ impl HummockManager {
// The compaction task is finished.
let mut versioning_guard = write_lock!(self, versioning).await;
let versioning = versioning_guard.deref_mut();
let _timer = start_measure_real_process_timer!(self);

let mut current_version = versioning.current_version.clone();
// purge stale compact_status
for group_id in original_keys {
Expand Down

0 comments on commit ed75502

Please sign in to comment.