-
Notifications
You must be signed in to change notification settings - Fork 34
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
[ReplicatedLoglet] Implement remote sequencer find tail #2017
base: main
Are you sure you want to change the base?
Conversation
1c84db6
to
148b191
Compare
Summary: Implements a remote loglet append calls to leader sequencer
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.
Thanks for creating this PR @muhamadazmy. What happens if we lose the GetSequencerInfo
or its response?
.call( | ||
&self.networking, | ||
self.params.sequencer, | ||
GetSequencerInfo { | ||
header: CommonRequestHeader { | ||
log_id: self.log_id, | ||
loglet_id: self.params.loglet_id, | ||
segment_index: self.segment_index, | ||
}, | ||
}, | ||
) | ||
.await |
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.
What happens if the request or response get lost? Would sync_sequencer_tail
get stuck?
); | ||
} | ||
_ => { | ||
unreachable!() |
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.
Maybe state why this case is unreachable. Maybe also don't use the wildcard. That way we'll see the places where a newly SequencerStatus
variant needs to be handled.
async fn sync_log_servers_tail(&self) -> Result<(), OperationError> { | ||
todo!() | ||
} |
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.
That's where #2019 comes into play, right?
if self.sync_sequencer_tail().await.is_ok() { | ||
return Ok(*self.known_global_tail.get()); | ||
} | ||
|
||
// otherwise we need to try to fetch this from the log servers. | ||
self.sync_log_servers_tail().await?; | ||
Ok(*self.known_global_tail.get()) |
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 there value in racing these two variants?
[ReplicatedLoglet] Implement remote sequencer find tail
Stack created with Sapling. Best reviewed with ReviewStack.