mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
raft: Set BatchApplyCh for more consistent batch sizes (#11907)
* raft: Set BatchApplyCh for more consistent batch sizes * Add changelog file
This commit is contained in:
3
changelog/11907.txt
Normal file
3
changelog/11907.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
raft: Improve raft batch size selection
|
||||
```
|
||||
@@ -671,6 +671,11 @@ func (b *RaftBackend) applyConfigSettings(config *raft.Config) error {
|
||||
config.NoSnapshotRestoreOnStart = true
|
||||
config.MaxAppendEntries = 64
|
||||
|
||||
// Setting BatchApplyCh allows the raft library to enqueue up to
|
||||
// MaxAppendEntries into each raft apply rather than relying on the
|
||||
// scheduler.
|
||||
config.BatchApplyCh = true
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user