-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat: improve progress msg in SHOW JOBS for source backfill #18925
feat: improve progress msg in SHOW JOBS for source backfill #18925
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
20a0b47
to
05b68bc
Compare
c662fa7
to
c9d083b
Compare
3498778
to
4a18292
Compare
// TODO: persist backfilled row count? | ||
let mut total_backfilled_rows: u64 = 0; |
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.
Follow-up here #18983, where I'm not quite satisfied with the solution. 😕
4a18292
to
1c50a1b
Compare
1c50a1b
to
eaa34e4
Compare
eaa34e4
to
0f6248b
Compare
let mv_progress = (mv_count > 0).then_some({ | ||
if self.upstream_mvs_total_key_count == 0 { | ||
"99.99%".to_string() | ||
} else { | ||
let mut progress = self.mv_backfill_consumed_rows as f64 | ||
/ (self.upstream_mvs_total_key_count as f64); | ||
if progress > 1.0 { | ||
progress = 0.9999; | ||
} | ||
format!( | ||
"{:.2}% ({}/{})", | ||
progress * 100.0, | ||
self.mv_backfill_consumed_rows, | ||
self.upstream_mvs_total_key_count | ||
) | ||
} | ||
}); | ||
let source_progress = (source_count > 0).then_some(format!( | ||
"{} rows consumed", | ||
self.source_backfill_consumed_rows | ||
)); | ||
match (mv_progress, source_progress) { | ||
(Some(mv_progress), Some(source_progress)) => { | ||
format!( | ||
"MView Backfill: {}, Source Backfill: {}", | ||
mv_progress, source_progress | ||
) | ||
} | ||
(Some(mv_progress), None) => mv_progress, | ||
(None, Some(source_progress)) => source_progress, | ||
(None, None) => "Unknown".to_string(), |
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.
core logic here
7d123f2
to
d3ef9bb
Compare
Can we show progress via backfilled offset instead? I assume offsets are monotonically increasing. So something like: average backfilled offset / upstream offset |
Good point. 🤔
|
But there's still a problem: we have per-partition offset. (i.e., in state table we have detailed per-split progress.) How to aggregate it for users?
Oh, I see your point here. |
Some points:
|
For kinesis offset, I think as long as long as it is monotonically increasing, we can still use its average. |
d3ef9bb
to
a38b1a4
Compare
a38b1a4
to
5ad1867
Compare
5ad1867
to
007900f
Compare
@kwannoel Do you think we can merge it in current form and refine later? |
Signed-off-by: xxchan <[email protected]>
…ll (#18925) to branch release-2.1 (#19046) Signed-off-by: xxchan <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Previous discussion here: #18112 (comment)
Previously,
progress
inSHOW JOBS
is a percentile string. After we introduced different type of backfill, things become tricker:progress
:risingwave/src/meta/src/barrier/creating_job/mod.rs
Lines 130 to 175 in 05b68bc
The idea of this PR is simple: just report separately, and abuse the string.
(Ideas to improve how the
progress
string look like is welcomed)Example:
Part of #18338
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.