hashicorp / hashicorp/raft

Behaviour on setting TrailingLogs to 0

Open
#86 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
9.1k
Forks
1.1k
Avg merge
3h 27m
Merged PRs (30d)
2

Description

https://gist.github.com/fahadullah/e49a4578094f4efd7746

If TrailingLogs is set to 0 and raft node is restarted right after taking a snapshot, it tries to look up the last index but all entries were already compacted. TrailingLogs being 0 should be a valid config though a little inefficient under certain cases.

Contributor guide

Open the contributing guide

Research direction

Start with the linked gist, then trace the snapshot and restart path for a Raft node configured with TrailingLogs set to 0. Reproduce the failure around the last-index lookup and verify that restarting immediately after a snapshot completes without trying to access compacted entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.