diff --git a/pkg/sql/catalog/lease/lease.go b/pkg/sql/catalog/lease/lease.go index 66a47ef7e8c1..2c13d3265a33 100644 --- a/pkg/sql/catalog/lease/lease.go +++ b/pkg/sql/catalog/lease/lease.go @@ -1874,7 +1874,7 @@ SELECT COALESCE(l."descID", s."desc_id") as "descID", COALESCE(l.version, s.vers // Early exit? row := rows[i] wg.Add(1) - lease := storedLease{ + lease := &storedLease{ id: descpb.ID(tree.MustBeDInt(row[0])), version: int(tree.MustBeDInt(row[1])), } @@ -1903,7 +1903,7 @@ SELECT COALESCE(l."descID", s."desc_id") as "descID", COALESCE(l.version, s.vers WaitForSem: true, }, func(ctx context.Context) { - m.storage.release(ctx, m.stopper, &lease) + m.storage.release(ctx, m.stopper, lease) log.Infof(ctx, "released orphaned lease: %+v", lease) wg.Done() }); err != nil {