Skip to content
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

raft: make MsgApp.Entries in StateProbe empty #131681

Open
pav-kv opened this issue Oct 1, 2024 · 0 comments
Open

raft: make MsgApp.Entries in StateProbe empty #131681

pav-kv opened this issue Oct 1, 2024 · 0 comments
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) C-performance Perf of queries or internals. Solution not expected to change functional behavior.

Comments

@pav-kv
Copy link
Collaborator

pav-kv commented Oct 1, 2024

When the follower replication flow is in StateProbe, the leader will likely send MsgApps with log entries.

The downsides of this:

A simple fix is to make StateProbe messages outright empty. However, this would have a performance impact because it's optimized for the happy case when the first probe is successful (and so some entries are replicated immediately). In a general case, this reduces post-StateProbe replication latency by one roundtrip to the follower.

There are some ideas in etcd-io/raft#150 on how to optimize these roundtrips differently. The "hints" in MsgAppResp can be extended to carry more information, as well as embedded in the MsgVoteResp to eliminate the first post-election probing roundrip.

Jira issue: CRDB-42653

@pav-kv pav-kv added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) C-performance Perf of queries or internals. Solution not expected to change functional behavior. A-kv-replication Relating to Raft, consensus, and coordination. labels Oct 1, 2024
@pav-kv pav-kv changed the title raft: make MsgApp in StateProbe have no entries raft: make MsgApp.Entries in StateProbe empty Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) C-performance Perf of queries or internals. Solution not expected to change functional behavior.
Projects
None yet
Development

No branches or pull requests

1 participant