-
Notifications
You must be signed in to change notification settings - Fork 686
fix(sink): Fix dead lock in replace-job with both upstream and downstream #23221
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
Conversation
I wonder which step in your explanation of deadlock is the newly introduced behavior from |
|
||
impl UpstreamSinkUnionExecutor { | ||
pub fn new( | ||
pub async fn new( |
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.
Can you add some comments to show that when this function might be blocking (i.e. not immediately ready)? Seems like the origin is RemoteInput::new
.
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, here we need to wait for establishing stream-rpc with the upstream actor.
Only on the main branch. |
Discussed offline. The dependency of To solve this, we can change to, while polling upstreaming messages, we can concurrently poll new barrier with mutation from barrier_rx, and then create new inputs when needed, so that the two won't have any dependency, and then the mentioned deadlock can be avoided. |
Merged to #23273 |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
We must register new outputs when creating an actor; otherwise, we will meet a deadlock.
execute()
.Merge
operator in downstream job must receive a barrier from the old table's fragment-graph before it can obtain the mutation, create a new upstream, and register new output.So, this becomes:
which will cause deadlocks, so we must register the upstream output when creating the actor.
Close #23064
Checklist
Documentation
Release note