-
Notifications
You must be signed in to change notification settings - Fork 526
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
refactor(metrics): use LabelGuarded for vec metrics in StreamingMetrics #16737
Conversation
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.
Rest LGTM
…hao/guarded-metrics-stream
Should I merge this first and let @stdrc do the rest? |
Can you wait for me? Will do it on the next work day. |
sure! Thanks |
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
I've refactored the Agg and GroupTopN part, also resolved some comment related to Source. PTAL, thanks! |
Signed-off-by: Richard Chien <[email protected]>
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.
Rest LGTM!
@@ -180,18 +186,14 @@ impl<S: StateStore> ColumnDeduplicater<S> { | |||
} | |||
|
|||
/// Flush the deduplication table. | |||
fn flush(&mut self, dedup_table: &StateTable<S>, ctx: ActorContextRef) { | |||
fn flush(&mut self, _dedup_table: &StateTable<S>) { |
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.
It seems that we won't flush the dedup_table
anymore here. May remove the parameter and also update the method comment and the method name to avoid confusion.
) -> StreamResult<Self> { | ||
let metrics_info = MetricsInfo::new( | ||
ctx.streaming_metrics.clone(), | ||
state_table.table_id(), | ||
ctx.id, | ||
"GroupTopN", | ||
"AppendOnlyGroupTopN", |
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.
Previously it was GroupTopN
. Was it a bug?
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.
Perhaps not, here is inside InnerAppendOnlyGroupTopNExecutor
.map(AsRef::as_ref) | ||
.collect::<Vec<&str>>(), | ||
) | ||
.with_guarded_label_values(&self.get_metric_labels().each_ref().map(AsRef::as_ref)) |
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.
A remaining temporary with_guarded_label_values
. Is this expected?
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.
Fixed
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.
Thanks for the great work!
) -> StreamResult<Self> { | ||
let metrics_info = MetricsInfo::new( | ||
ctx.streaming_metrics.clone(), | ||
state_table.table_id(), | ||
ctx.id, | ||
"GroupTopN", | ||
"AppendOnlyGroupTopN", |
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.
Perhaps not, here is inside InnerAppendOnlyGroupTopNExecutor
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
close #16728
related #12805
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.