release-25.4: sql/stats: nil-check cache in TableStatisticsCache.Stop#169690
release-25.4: sql/stats: nil-check cache in TableStatisticsCache.Stop#169690blathers-crl[bot] wants to merge 1 commit intorelease-25.4from
Conversation
Signed-off-by: SAY-5 <say.apm35@gmail.com>
f728e0b to
cf3bba0
Compare
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thanks for opening a backport. Before merging, please confirm that it falls into one of the following categories (select one):
Add a brief release justification to the PR description explaining your selection. Also, confirm that the change does not break backward compatibility and complies with all aspects of the backport policy. All backports must be reviewed by the TL and EM for the owning area. |
|
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
Detected infrastructure failure (matched: self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link) |
1 similar comment
|
Detected infrastructure failure (matched: self-hosted runner lost communication with the server). Automatically rerunning failed jobs. (run link) |
Backport 1/1 commits from #169624 on behalf of @SAY-5.
Fixes #169306
The closer registered in
NewTableStatisticsCachecallstableStatsCache.Stop. The closer is registered beforesc.mu.cacheis initialised on line 310. If the parent stopper begins draining closers during cache construction (rare, but observed inTestServerControlleron shared-process tenants),Stopfires on a partially-initialised cache andsc.mu.cache.Clear()nil-derefs. Guard theClearcall with a nil check;acc.Clearandmon.Stopare already either no-ops or guarded.Release note: None
Release justification: fix a missing nil check that could cause panic on user end.