Skip to content

Commit 9abaea4

Browse files
authored
Fix Raft heartbeat rate for Zero. (#3753)
In #3708 (4b41d9c) we bumped up the Raft heartbeat rate to 100ms ticks. This change also updates the heartbeat ticker for Zero too. Otherwise, Zero's election ticker would happen every 400ms instead of every 2s since raft.Config.ElectionTick is set to 20.
1 parent 58820c0 commit 9abaea4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dgraph/cmd/zero/raft.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ func (n *node) trySnapshot(skip uint64) {
598598

599599
func (n *node) Run() {
600600
var leader bool
601-
ticker := time.NewTicker(20 * time.Millisecond)
601+
ticker := time.NewTicker(100 * time.Millisecond)
602602
defer ticker.Stop()
603603

604604
// snapshot can cause select loop to block while deleting entries, so run

0 commit comments

Comments
 (0)