etcd: Increase the default max txn op count

The default of 128 is fairly low for large code bases. Please let us
know if you hit the new limit of 512.
This commit is contained in:
James Shubin
2017-09-19 19:54:54 -04:00
parent 915b022901
commit 24cb2e6450

View File

@@ -89,6 +89,13 @@ const (
DefaultIdealClusterSize = 5 // default ideal cluster size target for initial seed DefaultIdealClusterSize = 5 // default ideal cluster size target for initial seed
DefaultClientURL = "127.0.0.1:2379" DefaultClientURL = "127.0.0.1:2379"
DefaultServerURL = "127.0.0.1:2380" DefaultServerURL = "127.0.0.1:2380"
// DefaultMaxTxnOps is the maximum number of operations to run in a
// single etcd transaction. If you exceed this limit, it is possible
// that you have either an extremely large code base, or that you have
// some code which is possibly not as efficient as it could be. Let us
// know so that we can analyze the situation, and increase this if
// necessary.
DefaultMaxTxnOps = 512
) )
var ( var (
@@ -1710,6 +1717,7 @@ func (obj *EmbdEtcd) StartServer(newCluster bool, peerURLsMap etcdtypes.URLsMap)
cfg.ACUrls = aCUrls cfg.ACUrls = aCUrls
cfg.APUrls = aPUrls cfg.APUrls = aPUrls
cfg.StrictReconfigCheck = false // XXX: workaround https://github.com/coreos/etcd/issues/6305 cfg.StrictReconfigCheck = false // XXX: workaround https://github.com/coreos/etcd/issues/6305
cfg.MaxTxnOps = DefaultMaxTxnOps
cfg.InitialCluster = initialPeerURLsMap.String() // including myself! cfg.InitialCluster = initialPeerURLsMap.String() // including myself!
if newCluster { if newCluster {