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: Replace the parallel unit mapping with worker slot mapping in frontend. #16801

Merged
merged 32 commits into from
May 28, 2024

Conversation

shanicky
Copy link
Contributor

@shanicky shanicky commented May 17, 2024

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 replace the fixed global ParallelUnitId with a dynamically generated WorkerSlotId. The WorkerSlotId is in the format of a u64, created by the expression worker_id << 32 | slot_index

Because we switched to u64, some runtime types need to be converted from u32 to u64.

The previous PR #16205 used WorkerMapping, which resulted in the loss of parallelism information on the worker, leading to many strange parallelism judgment issues and causing a decline in performance.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

shanicky and others added 19 commits April 17, 2024 01:46
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
Signed-off-by: Shanicky Chen <[email protected]>
@shanicky shanicky force-pushed the peng/fe-remove-pu-slot branch from 8727943 to 40c8a7e Compare May 17, 2024 05:46
@shanicky shanicky changed the title [wip]feat: Replace the parallel unit mapping with worker slot mapping in frontend. feat: Replace the parallel unit mapping with worker slot mapping in frontend. May 17, 2024
@shanicky shanicky requested a review from yezizp2012 May 17, 2024 10:00
@shanicky shanicky mentioned this pull request May 17, 2024
6 tasks
@shanicky shanicky requested review from chenzl25 and zwang28 May 21, 2024 07:36
Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

LGTM.

@shanicky shanicky added this pull request to the merge queue May 28, 2024
Merged via the queue into main with commit 04cd1b5 May 28, 2024
30 of 31 checks passed
@shanicky shanicky deleted the peng/fe-remove-pu-slot branch May 28, 2024 07:19
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.

2 participants