Skip to content

Commit

Permalink
Merge #36011
Browse files Browse the repository at this point in the history
36011: sql: avoid wrapping the special lease expiration error object r=knz a=knz

Fixes #35734.

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

Co-authored-by: Raphael 'kena' Poss <[email protected]>
  • Loading branch information
craig[bot] and knz committed Mar 20, 2019
2 parents 6ac635f + d181e06 commit 63f0658
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/sql/schema_changer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 63f0658

Please sign in to comment.