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

fix(stream): reuse label guarded metrics for actor input output metrics #13994

Merged
merged 7 commits into from
Dec 14, 2023

Conversation

wenym1
Copy link
Contributor

@wenym1 wenym1 commented Dec 14, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Fix #13948

The cause is the same as described in #13966 (comment).

The reason for failing to resolve the issue with #13966 (comment) is that, in d1fedcb, in the metric report of dispatch, we call with_label_values in each dispatch call similar to in other code in the commit. However, the other code is generating long existing streams, but the dispatch is a async method call. So the value returned from with_label_values in dispatch is still dropped immediately, and the problem still exists.

Actually in d1fedcb the problem is half resolved. The actor input metrics is reported correctly already with the fix. In this PR we change to store the value returned from with_label_values as a field in the dispatch executor. The actor output metrics is reported correctly now.

Following in the grafana dashboard, we first run in d1fedcb, the input metrics is fixed while the output metrics is still with problem. Later we run code in this PR, and both the input and output metrics is fixed.

image

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

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.

Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8b2b3f7) 67.99% compared to head (c016836) 67.97%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13994      +/-   ##
==========================================
- Coverage   67.99%   67.97%   -0.03%     
==========================================
  Files        1536     1536              
  Lines      265403   265430      +27     
==========================================
- Hits       180462   180414      -48     
- Misses      84941    85016      +75     
Flag Coverage Δ
rust 67.97% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wenym1 wenym1 added this pull request to the merge queue Dec 14, 2023
Merged via the queue into main with commit 64a2d92 Dec 14, 2023
28 of 29 checks passed
@wenym1 wenym1 deleted the yiming/add_target_source_to_actor_input_output_rows branch December 14, 2023 13:47
wenym1 added a commit that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: LabelGuardedCounter metrics report incorrect value
2 participants