Skip to content

When a Raft leader is elected, it should first send an empty log entry. #43

@JoshuaChi

Description

@JoshuaChi

The Necessity of the No-op Entry

The core purpose of the no-op log entry in Raft is to address the following issues:

1. Committing Logs from Previous Terms

When a node becomes the Leader in term T, there may still be uncommitted log entries from earlier terms (term < T).
By successfully committing a no-op entry from term T, the Leader can indirectly cause those older entries to be committed—thanks to Raft’s Leader Completeness property.

2. Quickly Confirming Leader Authority

The no-op entry helps avoid the “ghost leader” problem—where a node believes it is the Leader but cannot actually contact a majority of the cluster.
Successfully committing a no-op entry provides strong evidence that the Leader is valid and has quorum support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    raft-electionLeader election mechanism and related issues

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions