Skip to content

Commit 27a2e7d

Browse files
committed
add warning when transport don't support prevote
1 parent 1912201 commit 27a2e7d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api.go

+3
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,9 @@ func NewRaft(conf *Config, fsm FSM, logs LogStore, stable StableStore, snaps Sna
567567
mainThreadSaturation: newSaturationMetric([]string{"raft", "thread", "main", "saturation"}, 1*time.Second),
568568
preVoteDisabled: conf.PreVoteDisabled || !transportSupportPreVote,
569569
}
570+
if !transportSupportPreVote && !conf.PreVoteDisabled {
571+
r.logger.Warn("pre-vote is disabled because it is not supported by the Transport")
572+
}
570573

571574
r.conf.Store(*conf)
572575

0 commit comments

Comments
 (0)