mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05: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:
parent
f42070ac6c
commit
053a7f2fa2
2 changed files with 8 additions and 0 deletions
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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue