Skip to content

Commit

Permalink
Added settings.Soft.MaxApplyEntrySize
Browse files Browse the repository at this point in the history
  • Loading branch information
lni committed May 6, 2022
1 parent 68cf0ad commit 88d5b52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/raft/logentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

var (
maxEntriesToApplySize = settings.Soft.MaxEntrySize
maxEntriesToApplySize = settings.Soft.MaxApplyEntrySize
)

// ErrCompacted is the error returned to indicate that the requested entries
Expand Down
3 changes: 3 additions & 0 deletions internal/settings/soft.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ type soft struct {
// InMemGCTimeout defines how often dragonboat collects partial object.
// It is defined in terms of number of ticks.
InMemGCTimeout uint64
// MaxApplyEntrySize defines the max size of entries to apply.
MaxApplyEntrySize uint64

//
// Multiraft
Expand Down Expand Up @@ -184,6 +186,7 @@ func getDefaultSoftSettings() soft {
MaxEntrySize: MaxMessageBatchSize,
InMemGCTimeout: 100,
InMemEntrySliceSize: 512,
MaxApplyEntrySize: 64 * 1024 * 1024,
MinEntrySliceFreeSize: 96,
IncomingReadIndexQueueLength: 4096,
IncomingProposalQueueLength: 2048,
Expand Down

0 comments on commit 88d5b52

Please sign in to comment.