Skip to content

Commit

Permalink
maxappendentries
Browse files Browse the repository at this point in the history
  • Loading branch information
alecjen committed Feb 1, 2021
1 parent 91af0f4 commit 7b22bfa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion api.go
Expand Up @@ -499,7 +499,7 @@ func NewRaft(conf *Config, fsm FSM, logs LogStore, stable StableStore, snaps Sna
// Create Raft struct.
r := &Raft{
protocolVersion: protocolVersion,
applyCh: make(chan *logFuture, conf.ApplyChSize),
applyCh: make(chan *logFuture, conf.MaxAppendEntries),
conf: *conf,
fsm: fsm,
fsmMutateCh: make(chan interface{}, 128),
Expand Down
3 changes: 0 additions & 3 deletions config.go
Expand Up @@ -145,9 +145,6 @@ type Config struct {
// staggering, may be delayed as much as 2x this value.
CommitTimeout time.Duration

// ApplyChSize will buffer applyCh with the configured size.
ApplyChSize int

// MaxAppendEntries controls the maximum number of append entries
// to send at once. We want to strike a balance between efficiency
// and avoiding waste if the follower is going to reject because of
Expand Down

0 comments on commit 7b22bfa

Please sign in to comment.