-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix: check split assignment before pushing mutation #18134
Conversation
Signed-off-by: tabVersion <tabvision@bupt.icu>
@@ -588,6 +588,32 @@ where | |||
) | |||
} | |||
|
|||
pub fn validate_assignment(assignment: &mut HashMap<ActorId, Vec<SplitImpl>>) { |
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.
Please revert after resolving the doubled assignment issue.
As it's just an in-memory validation, I think it's totally okay to keep it here.
|
||
for (split_id, actor_ids) in &mut split_to_actor { | ||
if actor_ids.len() > 1 { | ||
tracing::warn!(split_id = ?split_id, actor_ids = ?actor_ids, "split is assigned to multiple actors"); |
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 tend to panic here to expose the problem early. Otherwise, it will almost certainly trigger a panic in storage side, right?
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.
We don't know the root cause and have no way to fix the persisted data. From the frequency the users meet the problem, letting it panic and telling users to drop all sources can hurt the users' experience.
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.
Otherwise, it will almost certainly trigger a panic in storage side, right?
Oh, the following code will fix the multiple assignment issue and the compactor will no longer panic.
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.
Otherwise, it will almost certainly trigger a panic in storage side, right?
Oh, the following code will fix the multiple assignment issue and the compactor will no longer panic.
I see your point
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 but it's just a dirty fix. We still need to figure out the actual cause.
Signed-off-by: tabVersion <tabvision@bupt.icu>
Signed-off-by: tabVersion <tabvision@bupt.icu>
Signed-off-by: tabVersion <tabvision@bupt.icu>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Background: #16235
The pr increases overhead when pushing down mutation. Please revert after resolving the doubled assignment issue.
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.