This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uv: Set start_index correctly when no closed segments present
This issue came up while running the jepsen tests, steps are roughly: - Node receives snapshot install and deletes all closed segments preceding the snapshot. - After installing the snapshot, the node receives AppendEntries and adds the entries to an open segment. - Node gets killed. - Node boots and UvLoad closes the open segment using start_index 1, ignoring the index of the snapshot that is present in the data dir. - Node fails to start because the newly closed segment and the snapshot are inconsistent with a message `raft_start(): io: last entry on disk has index 383, which is behind last snapshot's index 3072"` Signed-off-by: Mathieu Borderé <mathieu.bordere@canonical.com>
- Loading branch information