-
Notifications
You must be signed in to change notification settings - Fork 613
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
refactor(batch): fine-grained serving vnode mapping rebalance #9718
Conversation
8c5f20c
to
eb4a53d
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.
license-eye has totally checked 3426 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
1556 | 1 | 1869 | 0 |
Click to see the invalid file list
- src/tests/simulation/tests/it/batch/mod.rs
3f5edf8
to
b20a42a
Compare
# Conflicts: # Cargo.lock
Compared with maintaining serving vnode mapping in meta node, I prefer current decentralized way (calculate by frontend on demand):
|
Codecov Report
@@ Coverage Diff @@
## main #9718 +/- ##
========================================
Coverage 71.10% 71.11%
========================================
Files 1250 1250
Lines 209199 209405 +206
========================================
+ Hits 148755 148920 +165
- Misses 60444 60485 +41
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 11 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The core function In short, vnode distribution it produces is not as balanced as expected. The ratio below shows how many given parallel units have been assigned at least one vnode. Take the worst case of "256 parallel units", 57.8125% roughly means half of available parallel units are assigned 2 vnodes each on average, and half of available parallel units are not used. But ideally each available parallel unit should be assigned exactly 1 vnode. 256 parallel units:
128 parallel units:
64 parallel units:
|
Let me summarize current situation. There is 3 design goals of serving vnode mapping strategy:
If we maintain the mapping in meta node, all 3 goals can be achieved easily. However, I still prefer current decentralized way (maintain mapping in frontend) instead, to avoid increasing complexity in meta:
With regard to decentralized way (maintain mapping in frontend), I find it hard to achieve all 3 goals at the same time:
My opinion is, as addition or removal of parallel units is rare, the round-robin approach in current main branch should suffice. So I'd like to hold this PR and related improvement. We can refactor to the centralized way (maintain in meta node) later as more use cases occurs. @fuyufjh @liurenjie1024 @hzxa21 Any comments? |
As you've mentioned, the "vnode mapping is just a hint" here. So is it possible that we make it centralized to the meta service but not persisted?
|
Make sense. |
I prefer the centralized approach in meta for several reasons:
For this problem, I think there are two approaches to solve it:
|
Replace with #10004 |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR makes two improvement related to vnode mapping strategy for serving:
#8940
Checklist For Contributors
./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