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: support scale SourceBackfill executor #16825

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented May 20, 2024

Signed-off-by: xxchan xxchan22f@gmail.com

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

What's changed and what's your intention?

part of #16003

Their are 2 main things to consider:

  1. Like Source, SourceBackfill need to migrate the connector splits. And the new assignment need to be aligned with the upstream. This part is relatively trivial.
  2. SourceBackfill is connected to the upstream Source with a NoShuffle. This makes it trickier, as the logic of scaling NoShuffle is relatively complex (scaling upstream vs scaling downstream is different). I'm not sure I've done this part correct.

Added sim tests (low-level reschedule) and manual e2e tests (high-level ALTER PARALLELISM).


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 Author

xxchan commented Jun 10, 2024

@xxchan xxchan force-pushed the xxchan/scale-source branch from f7f957f to 710adf4 Compare July 2, 2024 06:21
@xxchan xxchan changed the title support scaling source backfill feat[DRAFT]: support scaling source backfill Jul 2, 2024
@xxchan xxchan force-pushed the xxchan/scale-source branch from 3493eaa to 3311bdc Compare July 10, 2024 05:58
@xxchan xxchan changed the title feat[DRAFT]: support scaling source backfill feat[DRAFT]: support scale source backfill Jul 31, 2024
@xxchan xxchan force-pushed the xxchan/scale-source branch 3 times, most recently from 9509e3f to 3cc05b4 Compare July 31, 2024 06:56
@xxchan xxchan changed the base branch from main to 07-31-refactor_add_some_comments_for_scaling July 31, 2024 06:56
@xxchan xxchan force-pushed the 07-31-refactor_add_some_comments_for_scaling branch from 46b90b9 to 441460b Compare July 31, 2024 07:05
@xxchan xxchan force-pushed the xxchan/scale-source branch from 3cc05b4 to c14100d Compare July 31, 2024 07:05
Base automatically changed from 07-31-refactor_add_some_comments_for_scaling to main July 31, 2024 08:00
@xxchan xxchan force-pushed the xxchan/scale-source branch 6 times, most recently from a681dc0 to ff480ff Compare August 6, 2024 03:32
@xxchan xxchan changed the title feat[DRAFT]: support scale source backfill feat: support scale source backfill Aug 6, 2024
@xxchan xxchan marked this pull request as ready for review August 6, 2024 03:33
@xxchan xxchan requested a review from a team as a code owner August 6, 2024 03:33
@xxchan xxchan requested a review from lmatz August 6, 2024 03:33
@xxchan xxchan force-pushed the xxchan/scale-source branch 3 times, most recently from 32c62c6 to f430814 Compare September 2, 2024 07:10
@xxchan xxchan force-pushed the xxchan/scale-source branch from f430814 to 2391b38 Compare September 3, 2024 06:31
@xxchan xxchan requested a review from shanicky September 3, 2024 06:34
Base automatically changed from xxchan/drop-db to main September 3, 2024 08:29
@xxchan xxchan force-pushed the xxchan/scale-source branch from 2391b38 to 878e494 Compare September 3, 2024 10:08
@xxchan
Copy link
Member Author

xxchan commented Sep 4, 2024

Test failed. This is the problem described in #18300, and can be solved after #18112
image


After rebasing, it passed.

@xxchan xxchan force-pushed the xxchan/scale-source branch from 878e494 to c0a2cc1 Compare September 4, 2024 02:10
@xxchan xxchan changed the base branch from main to 08-16-feat_track_progress_for_sourcebackfill September 4, 2024 02:11
@xxchan xxchan force-pushed the 08-16-feat_track_progress_for_sourcebackfill branch from e2fd423 to a54a89f Compare September 4, 2024 02:32
@xxchan xxchan force-pushed the xxchan/scale-source branch 2 times, most recently from be7279c to e4499af Compare September 4, 2024 02:35
Base automatically changed from 08-16-feat_track_progress_for_sourcebackfill to main September 6, 2024 05:28
Copy link
Contributor

@shanicky shanicky left a comment

Choose a reason for hiding this comment

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

Scale part lgtm

We may need to conduct actual tests on the behavior of sources with split reduction like Kinesis during scaling (accompanied by split reduction). #9961

Signed-off-by: xxchan <xxchan22f@gmail.com>

add notes

Signed-off-by: xxchan <xxchan22f@gmail.com>

Merge remote-tracking branch 'origin/main' into xxchan/scale-source

add sim test

discard minor changes

Signed-off-by: xxchan <xxchan22f@gmail.com>
@xxchan xxchan force-pushed the xxchan/scale-source branch from e4499af to f825c33 Compare September 6, 2024 06:54
@xxchan
Copy link
Member Author

xxchan commented Sep 6, 2024

We may need to conduct actual tests on the behavior of sources with split reduction like Kinesis during scaling (accompanied by split reduction). #9961

#15994

@xxchan xxchan enabled auto-merge September 6, 2024 07:22
pub async fn alter_parallelism(
&self,
table_id: u32,
parallelism: PbTableParallelism,
mut deferred: bool,
) -> MetaResult<()> {
tracing::info!("alter parallelism");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
tracing::info!("alter parallelism");

Comment on lines +233 to +234
# # Note: the parallelism depends on the risedev profile.
# # So scale tests below are commented out.
Copy link
Member

Choose a reason for hiding this comment

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

I think these unenforced tests can be stale quickly. Shall we remove this as we've implemented madsim tests?

@xxchan xxchan added this pull request to the merge queue Sep 6, 2024
Merged via the queue into main with commit e2c89f4 Sep 6, 2024
31 of 32 checks passed
@xxchan xxchan deleted the xxchan/scale-source branch September 6, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants