release-26.1: sql/stats: nil-check cache in TableStatisticsCache.Stop#169692
release-26.1: sql/stats: nil-check cache in TableStatisticsCache.Stop#169692blathers-crl[bot] wants to merge 1 commit intorelease-26.1from
Conversation
Signed-off-by: SAY-5 <say.apm35@gmail.com>
65223b1 to
a507967
Compare
|
Thanks for opening a backport. Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate. |
|
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 |
|
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) |
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.