etcd: set embedded etcd default max msg size and up txn limit
This commit is contained in:
1 file changed
+2
-1
+2
-1
@@ -68,7 +68,7 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16,
|
|||||||
cfg.Dir = path
|
cfg.Dir = path
|
||||||
|
|
||||||
// To ensure that we can submit large transactions.
|
// To ensure that we can submit large transactions.
|
||||||
cfg.MaxTxnOps = 8192
|
cfg.MaxTxnOps = 16384
|
||||||
cfg.MaxRequestBytes = 16384 * 1024
|
cfg.MaxRequestBytes = 16384 * 1024
|
||||||
cfg.Logger = "zap"
|
cfg.Logger = "zap"
|
||||||
if logFile != "" {
|
if logFile != "" {
|
||||||
@@ -109,6 +109,7 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16,
|
|||||||
Host: "http://" + clientURL,
|
Host: "http://" + clientURL,
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
Namespace: defaultNamespace,
|
Namespace: defaultNamespace,
|
||||||
|
MaxMsgSize: int(cfg.MaxRequestBytes),
|
||||||
}
|
}
|
||||||
|
|
||||||
return connConfig, func() {
|
return connConfig, func() {
|
||||||
|
|||||||
Reference in new issue
Block a user