-
Notifications
You must be signed in to change notification settings - Fork 88
[ReplicatedLoglet] Implement remote sequencer find tail #2017
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
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?
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.
Yeah, that's definitely something that need to be handled. I have paused working on this draft PR in favour of #2019 and wasn't sure if I should continue on this one.
); | ||
} | ||
_ => { | ||
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.
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.
Good point. Thank you :)
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?
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.
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?
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 am not sure I get your question here.
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.
Whether we should run both variants for obtaining the known global tail in parallel/concurrently?
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.
Thank you for clarification. Yeah, that's definitely a good idea.
[ReplicatedLoglet] Implement remote sequencer find tail
Stack created with Sapling. Best reviewed with ReviewStack.