-
Notifications
You must be signed in to change notification settings - Fork 569
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 table distribution #18373
Conversation
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @BugenZhao and the rest of your teammates on Graphite |
use crate::hash::VirtualNode; | ||
use crate::row::Row; | ||
use crate::util::iter_util::ZipEqFast; | ||
|
||
/// For tables without distribution (singleton), the `DEFAULT_VNODE` is encoded. | ||
pub const DEFAULT_VNODE: VirtualNode = VirtualNode::ZERO; | ||
pub use DEFAULT_VNODE as SINGLETON_VNODE; | ||
|
||
use super::VnodeBitmapExt; | ||
|
||
#[derive(Debug, Clone)] | ||
enum ComputeVnode { |
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.
May just rename it to TableDistribution
, because the TableDistribution
only wraps compute_vnode
now.
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 sure whether we could introduce more common fields in the future. Up to @wenym1 to decide.
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
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.
Specifically in the upcoming PRs, we aim to decrease the direct references on
VirtualNode::COUNT
within the codebase. The total vnode count will be provided as a parameter in the refactored functions, although it will remain hardcoded asVirtualNode::COUNT
at the call-site. Eventually, it will be made user-facing.This PR refactors the
TableDistribution
. Logic changes are: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.