Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raft: Set BatchApplyCh for more consistent batch sizes #11907

Merged
merged 2 commits into from Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/11907.txt
@@ -0,0 +1,3 @@
```release-note:improvement
raft: Improve raft batch size selection
```
5 changes: 5 additions & 0 deletions physical/raft/raft.go
Expand Up @@ -663,6 +663,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
}

Expand Down