etcd: set embedded etcd default max msg size and up txn limit

This commit is contained in:
Andras Banki-Horvath
2022-01-21 17:24:55 +01:00
parent 5e90193180
commit 1093683b47

View File

@@ -68,7 +68,7 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16,
cfg.Dir = path
// To ensure that we can submit large transactions.
cfg.MaxTxnOps = 8192
cfg.MaxTxnOps = 16384
cfg.MaxRequestBytes = 16384 * 1024
cfg.Logger = "zap"
if logFile != "" {
@@ -109,6 +109,7 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16,
Host: "http://" + clientURL,
InsecureSkipVerify: true,
Namespace: defaultNamespace,
MaxMsgSize: int(cfg.MaxRequestBytes),
}
return connConfig, func() {