Skip to content

refactor: use sender of AppendEntries for known leader - #3213

Open
jamessmcgivern wants to merge 3 commits into
hydro-project:mainfrom
jamessmcgivern:use-sender-of-appendentries-for-known-leader
Open

jamessmcgivern wants to merge 3 commits into
hydro-project:mainfrom
jamessmcgivern:use-sender-of-appendentries-for-known-leader

Conversation

@jamessmcgivern

@jamessmcgivern jamessmcgivern commented Oct 3, 2026 •

Copy link
Copy Markdown

I do not think that there is a need for leader id in the AppendEntries request since sender id is already available to the recipient (and used in similar cases). It looks like the sender always uses its own id for leader id in the request.

@jamessmcgivern
jamessmcgivern requested a review from a team October 3, 2026 22:05
Comment thread hydro_test/src/cluster/raft.rs

@akainth015 akainth015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! This Raft implementation has lots of room of optimizations, incl. follower reads (and improvements like snapshotting)

Comment thread hydro_test/src/cluster/raft.rs
@jamessmcgivern jamessmcgivern changed the title use sender of AppendEntries for known leader refactor: use sender of AppendEntries for known leader Oct 4, 2026
Comment thread hydro_test/src/cluster/raft.rs
@MingweiSamuel

Copy link
Copy Markdown
Member

PR looks good besides the enforced formatting - btw you can run ./precheck.bash --hydro and the first steps are formatting and linting

@jamessmcgivern

Copy link
Copy Markdown
Author

flaky test?

@shadaj

shadaj commented Oct 5, 2026

Copy link
Copy Markdown
Member

I think you may have reformatted with an old Rust version / not nightly? So the diff ended up with a bunch of unrelated reformats.

@MingweiSamuel

Copy link
Copy Markdown
Member

Eh, yeah I guess nightly rustfmt updated. Perhaps we should not use nightly rustfmt anymore and just stick to the stable. I have pushed the most recent nightly fmt changes to main=

@MingweiSamuel
MingweiSamuel force-pushed the use-sender-of-appendentries-for-known-leader branch from 3210b07 to 01ee786 Compare October 5, 2026 20:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants