From a71d8f48f78d6ea2a258964179532f335d471898 Mon Sep 17 00:00:00 2001 From: Rongjian Lan Date: Tue, 10 Nov 2020 12:11:29 -0800 Subject: [PATCH] leave some time for finalCommit --- consensus/leader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/leader.go b/consensus/leader.go index 7a764c967..568694ce1 100644 --- a/consensus/leader.go +++ b/consensus/leader.go @@ -305,7 +305,7 @@ func (consensus *Consensus) onCommit(msg *msg_pb.Message) { go func(viewID uint64) { waitTime := 1000 * time.Millisecond - maxWaitTime := time.Until(consensus.NextBlockDue) + maxWaitTime := time.Until(consensus.NextBlockDue) - 100*time.Millisecond if maxWaitTime > waitTime { waitTime = maxWaitTime }