Skip to content

Commit

Permalink
lease: unredact lease struct
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aa-joshi committed Jan 16, 2025
1 parent 58e75b8 commit 019a20f
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 @@ -1877,7 +1877,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 @@ -1906,7 +1906,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 019a20f

Please sign in to comment.