From b3cd4f24c12dad76152583cbb2817b4eee85223b Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 5 Aug 2019 00:18:03 -0700 Subject: [PATCH] Documentation/upgrades: highlight "grpc.ErrClientConnClosing" Signed-off-by: Gyuho Lee --- Documentation/upgrades/upgrade_3_4.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Documentation/upgrades/upgrade_3_4.md b/Documentation/upgrades/upgrade_3_4.md index 5f9e51c73739..046e92ca4e6b 100644 --- a/Documentation/upgrades/upgrade_3_4.md +++ b/Documentation/upgrades/upgrade_3_4.md @@ -49,6 +49,29 @@ OK +etcd --peer-trusted-ca-file ca-peer.crt ``` +#### Deprecated `grpc.ErrClientConnClosing` error + +[`grpc.ErrClientConnClosing`](https://github.com/etcd-io/etcd/issues/9304) has been deprecated. + +```diff +import ( ++ "go.etcd.io/etcd/clientv3" + + "google.golang.org/grpc" ++ "google.golang.org/grpc/codes" ++ "google.golang.org/grpc/status" +) + +_, err := kvc.Get(ctx, "a") +-if err == grpc.ErrClientConnClosing { ++if clientv3.IsConnCanceled(err) { + +// or ++s, ok := status.FromError(err) ++if ok { ++ if s.Code() == codes.Canceled +``` + #### Deprecating `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metrics v3.4 promotes `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metrics to `etcd_mvcc_db_total_size_in_bytes`, in order to encourage etcd storage monitoring.