From d181e064efc0009027cc847a982d58839d58ae56 Mon Sep 17 00:00:00 2001 From: Raphael 'kena' Poss Date: Wed, 20 Mar 2019 23:54:58 +0100 Subject: [PATCH] sql: avoid wrapping the special lease expiration error object Issue #35854 notwithstanding, I misunderstood the logic and considered a "perfectly normal" case to be an internal error, which was wrong. This was causing long DDL txns to abort due to lease expirations, that they would not renew. Release note: None --- pkg/sql/schema_changer.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/sql/schema_changer.go b/pkg/sql/schema_changer.go index a3ba6d8bc3d0..1ba29e703e0e 100644 --- a/pkg/sql/schema_changer.go +++ b/pkg/sql/schema_changer.go @@ -278,8 +278,7 @@ func (sc *SchemaChanger) findTableWithLease( } if *tableDesc.Lease != lease { log.Errorf(ctx, "table: %d has lease: %v, expected: %v", sc.tableID, tableDesc.Lease, lease) - return nil, pgerror.NewAssertionErrorWithWrappedErrf(errExpiredSchemaChangeLease, - "table: %d has lease: %v, expected: %v", log.Safe(sc.tableID), log.Safe(tableDesc.Lease), log.Safe(lease)) + return nil, errExpiredSchemaChangeLease } return tableDesc, nil }