Skip to content

Commit 16c4fa2

Browse files
authored
Merge pull request #154220 from fqazi/blathers/backport-release-25.4-154184
release-25.4: catalog/lease: fix nil pointer dereference in purgeOldVersions
2 parents d480f2a + f27bba0 commit 16c4fa2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/sql/catalog/lease/lease.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,11 @@ func (m *Manager) purgeOldVersions(
12771277
}
12781278
// We encountered an error telling us to renew the lease.
12791279
newest := m.findNewest(id)
1280+
// It is possible that a concurrent drop / removal of this descriptor is
1281+
// occurring. If the newest version just doesn't exist, bail out.
1282+
if newest == nil {
1283+
break
1284+
}
12801285
// Assert this should never happen due to a fixed expiration, since the range
12811286
// feed is responsible for purging old versions and acquiring new versions.
12821287
if newest.hasFixedExpiration() {

0 commit comments

Comments
 (0)