-
Notifications
You must be signed in to change notification settings - Fork 594
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: try to remove parallel unit mapping in frontend #16205
Conversation
75c32cb
to
738db9a
Compare
cce0081
to
55bdf78
Compare
55bdf78
to
be9203d
Compare
480a376
to
ff0cccb
Compare
Refactor fragment mappings and cleanup code Refactor worker_node, enhance vnode logic, update imports & mapping Refactor: Disable `FragmentParallelUnitMapping` in protobuf and Rust code Refactor/gen: Improve formatting in `risingwave_common` tests Removed proto comments; updated Rust imports and tests. Remove `FragmentParallelUnitMapping` import and extra lines in `observer_manager.rs` Refactor FragManager, cleanup proto fields & comments Remove commented-out alternative vnode placement code Refactor: Clean up imports in fragment and streaming_job Refactor worker mapping in join operation Refactor fields() output in db lib for brevity Refine comments on migration and worker ID terms
ff0cccb
to
353adec
Compare
… & import management Signed-off-by: Shanicky Chen <[email protected]>
353adec
to
724d037
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.
IIUC, this PR only changes the frontend part and on the meta side, it still maintains the vnode to parallel unit mapping.
Yes, this PR simply removes the frontend's dependency on the parallel unit mapping. To fully eliminate the parallel unit, changes need to be made in both the scheduler and the scaling system, which will be addressed in updates #16167 and #16324. |
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.
LGTM
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.
LGTM
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.
Rest LGTM! thx for this PR.
We'd better reserve the fields in proto to avoid backward compatibility, since all the protos are possibly used in cloud side as well.
let fragment_mappings = get_fragment_mappings_by_jobs(&txn, streaming_jobs.clone()).await?; | ||
|
||
let fragment_mappings = fragment_mappings |
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.
Can we provide a helper function to wrap it, since this part will be used as long as the fragment mappings is transformed?
src/meta/src/controller/catalog.rs
Outdated
@@ -274,8 +278,30 @@ impl CatalogController { | |||
.into_tuple() | |||
.all(&txn) | |||
.await?; | |||
|
|||
let parallel_unit_to_worker = Self::get_parallel_unit_to_worker_map(&txn).await?; |
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.
Not related to this PR, we might need to cache it as well when we dully deprecate parallel units and maintain the fragment mapping in memory.
Signed-off-by: Shanicky Chen <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR attempts to remove the dependency on parallel unit mapping in the frontend and aims to minimize the occurrence of parallel units in the frontend as much as possible.
By replacing ParallelUnit with Worker, we can forcefully substitute ParallelUnitMapping with WorkerMapping. Essentially, the frontend locates the parallel unit through these vnodes, and then maps the parallel unit to the worker. Therefore, we can directly provide worker mapping.
Checklist
./risedev check
(or alias,./risedev c
)