|
@@ -105,6 +105,9 @@ type ClusterConfig struct {
|
|
|
GRPCKeepAliveTimeout time.Duration
|
|
GRPCKeepAliveTimeout time.Duration
|
|
|
// SkipCreatingClient to skip creating clients for each member.
|
|
// SkipCreatingClient to skip creating clients for each member.
|
|
|
SkipCreatingClient bool
|
|
SkipCreatingClient bool
|
|
|
|
|
+
|
|
|
|
|
+ ClientMaxCallSendMsgSize int
|
|
|
|
|
+ ClientMaxCallRecvMsgSize int
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type cluster struct {
|
|
type cluster struct {
|
|
@@ -232,15 +235,17 @@ func (c *cluster) HTTPMembers() []client.Member {
|
|
|
func (c *cluster) mustNewMember(t *testing.T) *member {
|
|
func (c *cluster) mustNewMember(t *testing.T) *member {
|
|
|
m := mustNewMember(t,
|
|
m := mustNewMember(t,
|
|
|
memberConfig{
|
|
memberConfig{
|
|
|
- name: c.name(rand.Int()),
|
|
|
|
|
- peerTLS: c.cfg.PeerTLS,
|
|
|
|
|
- clientTLS: c.cfg.ClientTLS,
|
|
|
|
|
- quotaBackendBytes: c.cfg.QuotaBackendBytes,
|
|
|
|
|
- maxTxnOps: c.cfg.MaxTxnOps,
|
|
|
|
|
- maxRequestBytes: c.cfg.MaxRequestBytes,
|
|
|
|
|
- grpcKeepAliveMinTime: c.cfg.GRPCKeepAliveMinTime,
|
|
|
|
|
- grpcKeepAliveInterval: c.cfg.GRPCKeepAliveInterval,
|
|
|
|
|
- grpcKeepAliveTimeout: c.cfg.GRPCKeepAliveTimeout,
|
|
|
|
|
|
|
+ name: c.name(rand.Int()),
|
|
|
|
|
+ peerTLS: c.cfg.PeerTLS,
|
|
|
|
|
+ clientTLS: c.cfg.ClientTLS,
|
|
|
|
|
+ quotaBackendBytes: c.cfg.QuotaBackendBytes,
|
|
|
|
|
+ maxTxnOps: c.cfg.MaxTxnOps,
|
|
|
|
|
+ maxRequestBytes: c.cfg.MaxRequestBytes,
|
|
|
|
|
+ grpcKeepAliveMinTime: c.cfg.GRPCKeepAliveMinTime,
|
|
|
|
|
+ grpcKeepAliveInterval: c.cfg.GRPCKeepAliveInterval,
|
|
|
|
|
+ grpcKeepAliveTimeout: c.cfg.GRPCKeepAliveTimeout,
|
|
|
|
|
+ clientMaxCallSendMsgSize: c.cfg.ClientMaxCallSendMsgSize,
|
|
|
|
|
+ clientMaxCallRecvMsgSize: c.cfg.ClientMaxCallRecvMsgSize,
|
|
|
})
|
|
})
|
|
|
m.DiscoveryURL = c.cfg.DiscoveryURL
|
|
m.DiscoveryURL = c.cfg.DiscoveryURL
|
|
|
if c.cfg.UseGRPC {
|
|
if c.cfg.UseGRPC {
|
|
@@ -501,21 +506,25 @@ type member struct {
|
|
|
// serverClient is a clientv3 that directly calls the etcdserver.
|
|
// serverClient is a clientv3 that directly calls the etcdserver.
|
|
|
serverClient *clientv3.Client
|
|
serverClient *clientv3.Client
|
|
|
|
|
|
|
|
- keepDataDirTerminate bool
|
|
|
|
|
|
|
+ keepDataDirTerminate bool
|
|
|
|
|
+ clientMaxCallSendMsgSize int
|
|
|
|
|
+ clientMaxCallRecvMsgSize int
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (m *member) GRPCAddr() string { return m.grpcAddr }
|
|
func (m *member) GRPCAddr() string { return m.grpcAddr }
|
|
|
|
|
|
|
|
type memberConfig struct {
|
|
type memberConfig struct {
|
|
|
- name string
|
|
|
|
|
- peerTLS *transport.TLSInfo
|
|
|
|
|
- clientTLS *transport.TLSInfo
|
|
|
|
|
- quotaBackendBytes int64
|
|
|
|
|
- maxTxnOps uint
|
|
|
|
|
- maxRequestBytes uint
|
|
|
|
|
- grpcKeepAliveMinTime time.Duration
|
|
|
|
|
- grpcKeepAliveInterval time.Duration
|
|
|
|
|
- grpcKeepAliveTimeout time.Duration
|
|
|
|
|
|
|
+ name string
|
|
|
|
|
+ peerTLS *transport.TLSInfo
|
|
|
|
|
+ clientTLS *transport.TLSInfo
|
|
|
|
|
+ quotaBackendBytes int64
|
|
|
|
|
+ maxTxnOps uint
|
|
|
|
|
+ maxRequestBytes uint
|
|
|
|
|
+ grpcKeepAliveMinTime time.Duration
|
|
|
|
|
+ grpcKeepAliveInterval time.Duration
|
|
|
|
|
+ grpcKeepAliveTimeout time.Duration
|
|
|
|
|
+ clientMaxCallSendMsgSize int
|
|
|
|
|
+ clientMaxCallRecvMsgSize int
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// mustNewMember return an inited member with the given name. If peerTLS is
|
|
// mustNewMember return an inited member with the given name. If peerTLS is
|
|
@@ -587,6 +596,8 @@ func mustNewMember(t *testing.T, mcfg memberConfig) *member {
|
|
|
Timeout: mcfg.grpcKeepAliveTimeout,
|
|
Timeout: mcfg.grpcKeepAliveTimeout,
|
|
|
}))
|
|
}))
|
|
|
}
|
|
}
|
|
|
|
|
+ m.clientMaxCallSendMsgSize = mcfg.clientMaxCallSendMsgSize
|
|
|
|
|
+ m.clientMaxCallRecvMsgSize = mcfg.clientMaxCallRecvMsgSize
|
|
|
|
|
|
|
|
m.InitialCorruptCheck = true
|
|
m.InitialCorruptCheck = true
|
|
|
|
|
|
|
@@ -630,8 +641,10 @@ func NewClientV3(m *member) (*clientv3.Client, error) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
cfg := clientv3.Config{
|
|
cfg := clientv3.Config{
|
|
|
- Endpoints: []string{m.grpcAddr},
|
|
|
|
|
- DialTimeout: 5 * time.Second,
|
|
|
|
|
|
|
+ Endpoints: []string{m.grpcAddr},
|
|
|
|
|
+ DialTimeout: 5 * time.Second,
|
|
|
|
|
+ MaxCallSendMsgSize: m.clientMaxCallSendMsgSize,
|
|
|
|
|
+ MaxCallRecvMsgSize: m.clientMaxCallRecvMsgSize,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if m.ClientTLSInfo != nil {
|
|
if m.ClientTLSInfo != nil {
|