-
Notifications
You must be signed in to change notification settings - Fork 591
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(meta): fix column binding for fragment ids #16133
Conversation
let actors: Vec<(ActorId, Vec<ActorId>)> = Actor::find() | ||
let actors: Vec<(ActorId, ActorUpstreamActors)> = Actor::find() |
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.
How did you find this is wrong? 🤡
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 was running some tests locally and the meta failed to restart when load_backfill_fragment_ids
. 🥵
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.
Wait, does it means that this is a serious bug and we need to patch it ASAP?
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.
😄 no worries, these part of codes are not in the release 1.8.
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, this can be triggered whenever any fragment is created (why?), like CREATE TABLE t()
, and then restart risingwave.
src/meta/src/controller/fragment.rs
Outdated
upstream_ids | ||
.into_inner() | ||
.into_iter() | ||
.flat_map(|(_, ids)| ids.into_iter()) | ||
.collect(), |
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 we can return the UpstreamActorIds as-is here, and only map
once in the caller site
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 thinking how can we prevent such silly mistakes. 🥵
5ac5d67
to
b0391c8
Compare
Didn't find a way while using the APIs of sea-orm. 🥵 We may only rely on e2e to prevent it. |
I think we can have a test case like simply stop and restart meta... 🤔 |
Wait, don't we already have this? |
Waiting for support in Madsim: #15612 |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Fixes from #16090 .
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.