Skip to content

Commit

Permalink
Merge #138800
Browse files Browse the repository at this point in the history
138800: lease: unredact lease struct r=aa-joshi a=aa-joshi

Previously, ID from lease was getting redacted in logs. This was creating challenge to support team to debug issues. This change makes sure that SafeFormat is getting invoked during logging.

Epic: CRDB-37533
Part of: CRDB-44885
Release note: None

Co-authored-by: Akshay Joshi <[email protected]>
  • Loading branch information
craig[bot] and aa-joshi committed Jan 27, 2025
2 parents 3acb4cd + 019a20f commit e8189e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/catalog/lease/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -2234,7 +2234,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])),
}
Expand Down Expand Up @@ -2263,7 +2263,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 {
Expand Down

0 comments on commit e8189e1

Please sign in to comment.