Skip to content

Commit

Permalink
mvcc: chanLen 1024 is to biger,and it used more memory. (#11987)
Browse files Browse the repository at this point in the history
128 seems to be enough.
Sometimes the consumption speed is more than the production speed.

See #11906 for more detail.
  • Loading branch information
cfc4n authored Jun 10, 2020
1 parent 3082a7d commit 26f6aee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mvcc/watchable_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ import (
var (
// chanBufLen is the length of the buffered chan
// for sending out watched events.
// TODO: find a good buf value. 1024 is just a random one that
// seems to be reasonable.
chanBufLen = 1024
// See https://github.com/etcd-io/etcd/issues/11906 for more detail.
chanBufLen = 128

// maxWatchersPerSync is the number of watchers to sync in a single batch
maxWatchersPerSync = 512
Expand Down

0 comments on commit 26f6aee

Please sign in to comment.