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(dashboard): fix back-pressure dashboard & some refactorings #15389

Merged
merged 14 commits into from
Mar 5, 2024

Conversation

fuyufjh
Copy link
Member

@fuyufjh fuyufjh commented Mar 2, 2024

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

What's changed and what's your intention?

  1. Remove the p50/p90/p95/p99 selections in back-pressure page, which is actually not that thing in your mind 😄 Accordingly, changed query_range() to query() in the Rust backend code.
  2. Rewrite the React code of the processing & display of embedded metrics. The original implementation looks obscure to me. Now the current & previous metrics are stored in EmbeddedBackPressureInfo and updated atomically.

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.

@github-actions github-actions bot added the type/fix Bug fix label Mar 2, 2024
@fuyufjh
Copy link
Member Author

fuyufjh commented Mar 2, 2024

Partially duplicated with #15380. I'll resolve conflicts after that PR to be merged.

Copy link
Member

@yufansong yufansong left a comment

Choose a reason for hiding this comment

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

Rest LGTM

const interval = setInterval(() => {
fetchEmbeddedBackPressure().then(
(newBP) => {
console.log(newBP)
Copy link
Member

@yufansong yufansong Mar 2, 2024

Choose a reason for hiding this comment

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

Maybe remove the log?

Copy link
Member Author

@fuyufjh fuyufjh Mar 4, 2024

Choose a reason for hiding this comment

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

Intended. It would help with debugging in some cases. The useFetch() also prints the log for responses.

dashboard/pages/fragment_graph.tsx Outdated Show resolved Hide resolved
Comment on lines 355 to 366
switch (backPressureAlgo) {
case "p50":
algoFunc = p50
break
case "p90":
algoFunc = p90
break
case "p95":
algoFunc = p95
break
case "p99":
algoFunc = p99
Copy link
Member

Choose a reason for hiding this comment

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

Remove the p50/p90/p95/p99 selections in back-pressure page, which is actually not that thing in your mind

You mentioned this in PR description. So what is you want, the current back pressure rate rather than a percentile in past time range?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a bit long story.

The percentiles didn't have a clear definition under this case. For example, the meaning of "the percentile of request latency" is clear and unambiguous: there are usually thousands of requests per seconds, and percentiles are the data points among these thousands of requests. However, in this cases, how to define percentiles of back-pressure? Among all actors, or among all the time? Either doesn't make sense to me.

In the existing implementation

  1. Average among all actors (written in the PromQL in the Rust code)
  2. Percentile among the data points during time range (written in web frontend)

I think most users including me don't expect this. After discussion with @BugenZhao, we decided to use average for both. Btw, actually, this part has already been merged in #15380.

@fuyufjh fuyufjh enabled auto-merge March 4, 2024 10:10
@BugenZhao BugenZhao changed the title fix(dasboard): fix back-pressure dashboard & some refactorings fix(dashboard): fix back-pressure dashboard & some refactorings Mar 5, 2024
@fuyufjh fuyufjh added this pull request to the merge queue Mar 5, 2024
Merged via the queue into main with commit e8513d4 Mar 5, 2024
27 of 28 checks passed
@fuyufjh fuyufjh deleted the eric/refactor_dashboard branch March 5, 2024 07:00
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.

3 participants