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

feat(streaming): recover no_shuffle_backfill #12493

Merged
merged 9 commits into from
Sep 26, 2023

Conversation

kwannoel
Copy link
Contributor

@kwannoel kwannoel commented Sep 22, 2023

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

What's changed and what's your intention?

  • Recover current_pos from state_table.
  • Also recover CreateMviewProgress, on recovery. For those which are already finished, they will still update their progress, and call finish, so the materialized view tracker can recover their progress.
  • Also we shouldn't need to commit state table anymore, once backfill is finished. So we remove that logic as well.
  • In this PR we also refactor the recovery logic. Previously current_pos, is_finished, and row_count are recovered separately. Now we recover them together, and handle backwards compatibility in recover_backfill_state.

This PR is a prerequisite of: #12167

we run a manual test in that PR #12167 to make sure we can recover the progress of an MV.

Checklist

  • I have written necessary rustdoc comments
  • 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 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.

@kwannoel kwannoel added ci/run-backwards-compat-tests Run backwards compatibility tests in your PR. ci/run-backfill-tests labels Sep 22, 2023
@kwannoel kwannoel force-pushed the kwannoel/recover-no-shuffle-backfill-state branch from e4b04c4 to 1b301ae Compare September 22, 2023 08:41
@kwannoel kwannoel force-pushed the kwannoel/recover-no-shuffle-backfill-state branch from efe8600 to ba96852 Compare September 22, 2023 09:34
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #12493 (cd4e3d5) into main (063f58e) will decrease coverage by 0.01%.
Report is 14 commits behind head on main.
The diff coverage is 3.57%.

@@            Coverage Diff             @@
##             main   #12493      +/-   ##
==========================================
- Coverage   69.41%   69.41%   -0.01%     
==========================================
  Files        1429     1429              
  Lines      238590   238598       +8     
==========================================
+ Hits       165621   165622       +1     
- Misses      72969    72976       +7     
Flag Coverage Δ
rust 69.41% <3.57%> (-0.01%) ⬇️

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

Files Coverage Δ
...ream/src/executor/backfill/arrangement_backfill.rs 0.00% <ø> (ø)
src/stream/src/executor/backfill/utils.rs 9.97% <ø> (+1.14%) ⬆️
src/stream/src/executor/chain.rs 89.15% <ø> (ø)
src/stream/src/executor/rearranged_chain.rs 0.00% <ø> (ø)
src/stream/src/executor/values.rs 90.69% <ø> (ø)
...c/stream/src/task/barrier_manager/managed_state.rs 83.24% <0.00%> (ø)
src/stream/src/task/barrier_manager/progress.rs 53.42% <42.85%> (-1.51%) ⬇️
src/meta/src/barrier/progress.rs 7.65% <0.00%> (-0.08%) ⬇️
...tream/src/executor/backfill/no_shuffle_backfill.rs 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kwannoel kwannoel changed the title feat(streaming): recover no_shuffle_backfill state feat(streaming): recover no_shuffle_backfill Sep 22, 2023
@kwannoel kwannoel force-pushed the kwannoel/recover-no-shuffle-backfill-state branch from 8051f16 to 27af793 Compare September 22, 2023 15:30
@kwannoel kwannoel requested a review from chenzl25 September 26, 2023 04:54
Copy link
Contributor

@chenzl25 chenzl25 left a comment

Choose a reason for hiding this comment

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

LGTM

@kwannoel kwannoel added this pull request to the merge queue Sep 26, 2023
Merged via the queue into main with commit a6fb341 Sep 26, 2023
6 of 7 checks passed
@kwannoel kwannoel deleted the kwannoel/recover-no-shuffle-backfill-state branch September 26, 2023 06:49
BugenZhao pushed a commit that referenced this pull request Sep 27, 2023
…2123)

feat(java-binding): generate jni method signature with macro (#12487)

feat(streaming): recover `no_shuffle_backfill` (#12493)

feat(test): support customized source logic in deterministic test (#12456)

refactor(storage): reorg selector (#12392)

feat(frontend): add rw_catalog.rw_hummock_sstables (#12532)

chore: bump risingwave version in docker compose to 1.2.0 (#12530)

Signed-off-by: Bugen Zhao <[email protected]>

refactor(sink): decouple sink formatter and payload writer (#12515)

chore(java-binding): refine stream chunk benchmark (#12504)

feat(meta): add create_type to `Table` (#12529)

refactor(sink): refine sink trait and macro (#12478)

refactor(backup): refine error message (#12388)

feat(sink): turn sink writer into higher level log sinker (#12152)

fix(over window): don't expect stream keys in UpdateDelete and UpdateInsert the same (#12536)

Signed-off-by: Richard Chien <[email protected]>

refactor(expr): separate function implementations into a new crate (#12485)

Signed-off-by: Runji Wang <[email protected]>

fix(config): make metrics_level opt backward compatible (#12541)

refactor(connector): replace sink writer rpc with jni (#12480)

refactor(connector): remove `WriteGuard` and `fulfill_meta_column` from parser (#12542)

Signed-off-by: Bugen Zhao <[email protected]>

feat(sink): handle stream key sink pk mismatch (#12458)

feat(optimizer): support apply hop window transpose rule (#12338)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants