Skip to content

raft: make MsgApp.Entries in StateProbe empty #131681

Open
@pav-kv

Description

@pav-kv

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 and #136296 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-kv-replicationRelating to Raft, consensus, and coordination.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)C-performancePerf of queries or internals. Solution not expected to change functional behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions