Skip to content

Commit 3d2772e

Browse files
committed
Set raftCommitTimeout to 50ms (HashiCorp Raft default)
1ms was too aggressive and increased replication chatter. 50ms matches the upstream default batch window.
1 parent cc636f6 commit 3d2772e

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

multiraft_runtime.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ type raftGroupRuntime struct {
2424
closeStores func()
2525
}
2626

27-
// raftCommitTimeout is intentionally short (1ms) to minimize latency for
28-
// single-node and low-latency cluster deployments. Raft.Apply still blocks
29-
// until the log entry is committed, so this only affects the initial timeout
30-
// before returning an error if the leader cannot commit in time.
31-
const raftCommitTimeout = 1 * time.Millisecond
27+
const raftCommitTimeout = 50 * time.Millisecond
3228

3329
func (r *raftGroupRuntime) Close() {
3430
if r == nil {

0 commit comments

Comments
 (0)