Skip to content

Commit e797962

Browse files
committed
docs: clarify RestoreCommittedLogs configuration requirement
- Add a notice in the Config struct documentation for RestoreCommittedLogs - Specify that Raft will fail to start with ErrIncompatibleLogStore if the requirement is not met
1 parent 30fc43e commit e797962

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config.go

+3
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ type Config struct {
243243
// the application allows relaxed-consistency reads from followers as it
244244
// will reduce how far behind the follower's FSM is when it starts. If all reads
245245
// are forwarded to the leader then there won't be observable benefit from this feature.
246+
//
247+
// Notice: If this is enabled, the log store MUST implement the CommitTrackingLogStore
248+
// interface. Otherwise, Raft will fail to start and return ErrIncompatibleLogStore.
246249
RestoreCommittedLogs bool
247250

248251
// skipStartup allows NewRaft() to bypass all background work goroutines

0 commit comments

Comments
 (0)