-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix(storage): Distinguish between unssigned_task and tivival_move_task in the metrics report #7742
Conversation
…k in the metrics report
src/meta/src/hummock/manager/mod.rs
Outdated
if CompactStatus::is_trivial_move_task(compact_task) { | ||
// TODO: only support can_trivial_move in DynamicLevelCompcation, will check | ||
// task_type next PR | ||
self.metrics | ||
.compact_frequency | ||
.with_label_values(&[ | ||
"trivial-move", | ||
&compact_task.compaction_group_id.to_string(), | ||
task_status_label, | ||
]) | ||
.inc(); | ||
} else { | ||
// Update compaction task count. The task will be marked as `unassigned`. | ||
self.metrics | ||
.compact_frequency | ||
.with_label_values(&[ | ||
"unassigned", | ||
&compact_task.compaction_group_id.to_string(), | ||
task_status_label, | ||
]) | ||
.inc(); | ||
} |
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.
nit: may simplify to
let label = if CompactStatus::is_trivial_move_task(compact_task) {
"trivial-move"
} else {
"unassigned"
};
self.metrics.compact_frequency.with_label_values(...).inc();
Codecov Report
@@ Coverage Diff @@
## main #7742 +/- ##
==========================================
- Coverage 71.68% 71.67% -0.01%
==========================================
Files 1098 1098
Lines 174553 174558 +5
==========================================
- Hits 125133 125121 -12
- Misses 49420 49437 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
In the existing code, if the assignee_context_id is not found, the corresponding task will be reported to the unassigned label, which is confusing.
In this pr, it will distinguish trivival_move_task from unassigned more precisely so that they can be better distinguished in the metrics.
Checklist
- [ ] I have added necessary unit tests and integration tests- [ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features).- [ ] I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer the issue)./risedev check
(or alias,./risedev c
)Documentation
If your pull request contains user-facing changes, please specify the types of the changes, and create a release note. Otherwise, please feel free to remove this section.
Types of user-facing changes
Please keep the types that apply to your changes, and remove those that do not apply.
Release note
Please create a release note for your changes. In the release note, focus on the impact on users, and mention the environment or conditions where the impact may occur.
Refer to a related PR or issue link (optional)