-
Notifications
You must be signed in to change notification settings - Fork 596
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: unify compute vnode logic #14526
Conversation
This PR aims to behave consistently to before this PR. This PR is likely to affect the two behaviors of the following in log store, storage table and state table. The first is vnode bitmap management, including fetching the current vnode bitmap, and handling update vnode bitmap. The second is the logic of computing vnode. If we can safely assume that, when we initially pass |
27a75f4
to
e6feb44
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.
Rest LGTM
@@ -87,6 +87,14 @@ impl VirtualNode { | |||
Self(scalar as _) | |||
} | |||
|
|||
pub const fn vnode_data_type() -> DataType { |
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.
It appears that RW_TYPE
already exists.
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.
fixed.
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!
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Currently in our batch
StorageTable
and streamingStateTable
, we shared a similar logic to compute vnode.Code with similar logic appear in both
StorageTable
andStateTable
. In this PR, we unify this logic to therisingwave_storage::table::Distribution
. The type is renamed toTableDistribution
to be distinguished with the optimizerDistribution
. TheTableDistribution
will hold a enum with the following definitionChecklist
./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.