From a99064b8c4953220e779eb04c036899b2b4d6d4f Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Tue, 27 Apr 2021 16:26:59 -0700 Subject: [PATCH] pgcode: remove a couple of deprecated errors Release note: None --- pkg/sql/pgwire/pgcode/codes.go | 9 --------- pkg/sql/schema_changer.go | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/pkg/sql/pgwire/pgcode/codes.go b/pkg/sql/pgwire/pgcode/codes.go index 2d2b8c1d5a44..c8d82da7af05 100644 --- a/pkg/sql/pgwire/pgcode/codes.go +++ b/pkg/sql/pgwire/pgcode/codes.go @@ -374,17 +374,8 @@ var ( // RangeUnavailable signals that some data from the cluster cannot be // accessed (e.g. because all replicas awol). RangeUnavailable = MakeCode("58C00") - // DeprecatedRangeUnavailable is code that we used for RangeUnavailable until 19.2. - // 20.1 needs to recognize it coming from 19.2 nodes. - // TODO(andrei): remove in 20.2. - DeprecatedRangeUnavailable = MakeCode("XXC00") // InternalConnectionFailure refers to a networking error encountered // internally on a connection between different Cockroach nodes. InternalConnectionFailure = MakeCode("58C01") - // DeprecatedInternalConnectionFailure is code that we used for - // InternalConnectionFailure until 19.2. - // 20.1 needs to recognize it coming from 19.2 nodes. - // TODO(andrei): remove in 20.2. - DeprecatedInternalConnectionFailure = ConnectionFailure ) diff --git a/pkg/sql/schema_changer.go b/pkg/sql/schema_changer.go index 4daec18eb572..fc08a4f3f601 100644 --- a/pkg/sql/schema_changer.go +++ b/pkg/sql/schema_changer.go @@ -181,10 +181,10 @@ func isPermanentSchemaChangeError(err error) bool { } switch pgerror.GetPGCode(err) { - case pgcode.SerializationFailure, pgcode.InternalConnectionFailure, pgcode.DeprecatedInternalConnectionFailure: + case pgcode.SerializationFailure, pgcode.InternalConnectionFailure: return false - case pgcode.Internal, pgcode.RangeUnavailable, pgcode.DeprecatedRangeUnavailable: + case pgcode.Internal, pgcode.RangeUnavailable: if strings.Contains(err.Error(), context.DeadlineExceeded.Error()) { return false }