Skip to content

Should reset committed index after replay logs #320

@lzydmxy

Description

@lzydmxy

RaftKeeper version

2.1.0

Description

2024.06.20 18:12:28.761597 [ 53213 ] <Information> LastCommittedIndexManager: Read last committed index 318789221
2024.06.20 18:12:55.554352 [ 53213 ] <Information> KeeperStateMachine: Replayed log batch [318647616, 318654803)

We replay log to 318654803 which is lower than 318789221, we should reset our log index to 318654803.

After the node starts, the replay log should reset the node's committed index to the actual replay log index to prevent startup anomalies caused by local log file loss or write failures.

How to reproduce

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions