-
Notifications
You must be signed in to change notification settings - Fork 570
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: remote input subscribe on barrier mutation #17612
Conversation
Didn't get this point. I thought it's necessary for the |
For the usual case that |
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
/// Received barrier from actors in other compute nodes in remote input, however no `send_barrier` | ||
/// request from the meta service is issued. | ||
Stashed { | ||
/// Senders registered by the remote input. | ||
mutation_senders: Vec<oneshot::Sender<Option<Arc<Mutation>>>>, | ||
}, | ||
|
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's quite clever that the new impl eliminates the need for the Stashed
state.
// The barrier no more collect from such actor. End subscribe on mutation. | ||
return; |
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.
Is this actually unreachable?
EDIT: only when prev_epoch == start_prev_epoch
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.
The rest LGTM
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,
RemoteInput
fetches the mutation of each barrier fromLocalBarrierWorker
by per-barrier sending a request to it and wait on a response oneshot channel.This mechanism has some disadvantages:
LocalBarrierWorker
may get a great number of these request, which may block the handling of other request.In this PR, we change to using a long existing channel to subscribe on barrier mutation. On the first barrier, the
RemoteInput
will send aSubscribeBarrierMutation
request to theLocalBarrierWorker
, including the actor_id and start epoch. When receiving this request, theLocalBarrierWorker
will respond with the mutation of barriers that are already injected and has epoch later than start epoch. When later receiving barrier, it will push the mutation to the sender so that theRemoteInput
can receive the mutation.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.