diff --git a/Documentation/upgrades/upgrade_3_2.md b/Documentation/upgrades/upgrade_3_2.md index 67cab1ed9ab..60e3c717048 100644 --- a/Documentation/upgrades/upgrade_3_2.md +++ b/Documentation/upgrades/upgrade_3_2.md @@ -137,6 +137,29 @@ err.Error() == "rpc error: code = ResourceExhausted desc = grpc: received messag **If not specified, client-side send limit defaults to 2 MiB (1.5 MiB + gRPC overhead bytes) and receive limit to `math.MaxInt32`**. Please see [clientv3 godoc](https://godoc.org/github.com/coreos/etcd/clientv3#Config) for more detail. +#### Change in raw gRPC client wrappers + +3.2.12 or later changes the function signatures of `clientv3` gRPC client wrapper. This change was needed to support [custom `grpc.CallOption` on message size limits](https://github.com/coreos/etcd/pull/9047). + +Before and after + +```diff +-func NewKVFromKVClient(remote pb.KVClient) KV { ++func NewKVFromKVClient(remote pb.KVClient, c *Client) KV { + +-func NewClusterFromClusterClient(remote pb.ClusterClient) Cluster { ++func NewClusterFromClusterClient(remote pb.ClusterClient, c *Client) Cluster { + +-func NewLeaseFromLeaseClient(remote pb.LeaseClient, keepAliveTimeout time.Duration) Lease { ++func NewLeaseFromLeaseClient(remote pb.LeaseClient, c *Client, keepAliveTimeout time.Duration) Lease { + +-func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient) Maintenance { ++func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient, c *Client) Maintenance { + +-func NewWatchFromWatchClient(wc pb.WatchClient) Watcher { ++func NewWatchFromWatchClient(wc pb.WatchClient, c *Client) Watcher { +``` + #### Change in `--listen-peer-urls` and `--listen-client-urls` 3.2 now rejects domains names for `--listen-peer-urls` and `--listen-client-urls` (3.1 only prints out warnings), since domain name is invalid for network interface binding. Make sure that those URLs are properly formated as `scheme://IP:port`. diff --git a/Documentation/upgrades/upgrade_3_3.md b/Documentation/upgrades/upgrade_3_3.md index 95ee6c64204..bb663955af8 100644 --- a/Documentation/upgrades/upgrade_3_3.md +++ b/Documentation/upgrades/upgrade_3_3.md @@ -184,6 +184,29 @@ err.Error() == "rpc error: code = ResourceExhausted desc = grpc: received messag **If not specified, client-side send limit defaults to 2 MiB (1.5 MiB + gRPC overhead bytes) and receive limit to `math.MaxInt32`**. Please see [clientv3 godoc](https://godoc.org/github.com/coreos/etcd/clientv3#Config) for more detail. +#### Change in raw gRPC client wrappers + +3.3 changes the function signatures of `clientv3` gRPC client wrapper. This change was needed to support [custom `grpc.CallOption` on message size limits](https://github.com/coreos/etcd/pull/9047). + +Before and after + +```diff +-func NewKVFromKVClient(remote pb.KVClient) KV { ++func NewKVFromKVClient(remote pb.KVClient, c *Client) KV { + +-func NewClusterFromClusterClient(remote pb.ClusterClient) Cluster { ++func NewClusterFromClusterClient(remote pb.ClusterClient, c *Client) Cluster { + +-func NewLeaseFromLeaseClient(remote pb.LeaseClient, keepAliveTimeout time.Duration) Lease { ++func NewLeaseFromLeaseClient(remote pb.LeaseClient, c *Client, keepAliveTimeout time.Duration) Lease { + +-func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient) Maintenance { ++func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient, c *Client) Maintenance { + +-func NewWatchFromWatchClient(wc pb.WatchClient) Watcher { ++func NewWatchFromWatchClient(wc pb.WatchClient, c *Client) Watcher { +``` + #### Change in clientv3 `Snapshot` API error type Previously, clientv3 `Snapshot` API returned raw [`grpc/*status.statusError`] type error. v3.3 now translates those errors to corresponding public error types, to be consistent with other APIs.