-
Notifications
You must be signed in to change notification settings - Fork 611
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(source): experimental support for split reduction. #9714
Conversation
4e74e3f
to
0662133
Compare
Codecov Report
@@ Coverage Diff @@
## main #9714 +/- ##
==========================================
- Coverage 71.05% 71.04% -0.01%
==========================================
Files 1249 1249
Lines 208521 208594 +73
==========================================
+ Hits 148167 148201 +34
- Misses 60354 60393 +39
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
5e83d1d
to
eefd899
Compare
…ChangeSplit(actor_splits)` variant.
95cb906
to
388a7fb
Compare
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.
generally LGTM, please make sure a switch can turn off the experimental pr
@BugenZhao PTAL |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR experimentally supports split reduction.
When the source in the source manager enables the split scale-in function, the source manager will treat the split reduction as a change instead of ignoring it during the tick, leading to an in-place removal and pushing the assignment downstream. Upon receiving this, the source executor will consider the split reduction as a state change and delete the removed split's state during the commit phase.
Please note that the changes in this PR will need complex testing. cc @tabVersion
generated by gpt
Experimental Support for Split Reduction
This Pull Request introduces several key changes across the
scale.rs
,source_manager.rs
,source_executor.rs
, andstate_table_handler.rs
files.Main Changes
reallocate_splits
function and its usageoaicite:{"index":10,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.oaicite:{"index":11,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.oaicite:{"index":12,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.drain_filter
method for cacheoaicite:{"index":13,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.oaicite:{"index":14,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.trim_state
, log trimmingoaicite:{"index":15,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.SourceExecutor
's split tracking and migration checkoaicite:{"index":16,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.SourceExecutor
match expression to add a newMutation::Source
oaicite:{"index":17,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"ac725ec Refactor reallocate_splits function & usage. shanicky May 9, 2023 4db8ea0 Add split removal handling & reallocation shanicky May 9, 2023 bd69c6f Improve source state persistence and trim ability shanicky May 9, 2023 a72bc0b Fix
drain_filtermethod for cache. shanicky May 9, 2023 1d6b0a0 Improved split migration handling and memory efficiency shanicky May 10, 2023 674c9ff Async delete & trim_state, log trimming shanicky May 10, 2023 0444abd Refactor SourceExecutor's split tracking and migration check shanicky May 10, 2023 eefd899 Modify
SourceExecutormatch expression to add new
Mutation::Source… shanicky May 10, 2023","pub_date":null}}`.File Changes
scale.rs
: 12 changes (10 additions, 2 deletions)oaicite:{"index":18,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"12 changes: 10 additions & 2 deletions 12 src/meta/src/stream/scale.rs","pub_date":null}}
.source_manager.rs
: 47 changes (24 additions, 23 deletions)oaicite:{"index":19,"metadata":{"title":"","url":"https://github.com/risingwavelabs/risingwave/pull/9714/files","text":"47 changes: 24 additions & 23 deletions 47 src/meta/src/stream/source_manager.rs","pub_date":null}}
.Checklist For Contributors
- [ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934)../risedev check
(or alias,./risedev c
)Checklist For Reviewers
Documentation
Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.
Release note