mvcc: chanLen 1024 is to biger,and it used more memory. 128 seems to be enough. Sometimes the consumption speed is more than the production speed.

See https://github.com/etcd-io/etcd/issues/11906 for more detail.
release-3.3
cfc4n 2020-06-10 14:59:11 +08:00 committed by CFC4N
parent cdc1c8f02f
commit 8c885ad9a9
1 changed files with 2 additions and 3 deletions

View File

@ -28,9 +28,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