-
Notifications
You must be signed in to change notification settings - Fork 590
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: variable vnode count support in vnode structure #18381
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @BugenZhao and the rest of your teammates on Graphite |
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!
pub const COUNT: usize = 1 << 8; | ||
/// The maximum value of the virtual node. | ||
// TODO(var-vnode): remove this and only keep `MAX_FOR_TEST` | ||
pub const MAX: VirtualNode = VirtualNode::from_index(Self::COUNT - 1); |
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.
I think COUNT
and MAX
mean the same thing. Shall we merge them into one? Or do you plan to do it in the future PRs?
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.
Yes. They are just in different types. Will refactor in future PRs.
574ee3f
to
9c99bd7
Compare
9c99bd7
to
e1ad5ea
Compare
Signed-off-by: Bugen Zhao <[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 is a progress towards #15900.
This PR refactors the
VirtualNode
andVnodeMapping
. Logic changes are:VirtualNode::COUNT
.Checklist
./risedev check
(or alias,./risedev c
)Documentation
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.