-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add support for co-locating sequencers and partition processor leaders #2115
Conversation
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.
Super clean and logical! Modulo the imports comments, this reads to me like it's ready to merge 🚢
fn sequencer_node(&self) -> Option<PlainNodeId> { | ||
match self { | ||
LogletConfiguration::Replicated(configuration) => { | ||
Some(configuration.sequencer.as_plain()) |
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'm not entirely sure why is this a plain node id.
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 this is wrong. Will change it to return GenerationalNodeId
.
Thanks for the review @pcholakov and @AhmedSoliman. I've addressed your comments and pushed another commit. |
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.
Looks good from a quick look. I've just left one question on the preference fallback order but overall this good to merge.
let sequencer = preferred_sequencer | ||
.and_then(|node_id| { | ||
// map to a known alive node | ||
observed_cluster_state.alive_nodes.get(&node_id.id()) |
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.
Don't we lose strictness of preference by potentially swapping the generational node id that was requested with whatever generation that we have in the list of alive nodes?
Is that intention here to fallback back in this order?
- Generational node if it's alive
- Other generation of the same node if alive
- Any other alive node
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 problem is what if a GenerationalNodeId
is specified that is not known to be alive? In this case, the logs controller will try to reconfigure the log on the next tick. That's why the order, you've described, is what is being followed.
Right now, the scheduler won't give a GenerationalNodeId
hint since the chosen partition processor leader is not bound to a generation.
616f229
to
0539022
Compare
Let Scheduler respect replicated loglet placements Let LogsController respect the preferred sequencer node This fixes restatedev#2081.
0539022
to
141bd1c
Compare
Let Scheduler respect replicated loglet placements
Let LogsController respect the preferred sequencer node
This fixes #2081.