release-26.2: descs: evict stale SystemDatabaseCache entries on descriptor-not-found#169389
Merged
trunk-io[bot] merged 1 commit intoApr 30, 2026
Conversation
PR cockroachdb#169044 allowed SystemDatabaseCache to accept updated name→ID mappings, but the update path was never triggered because the stale cache hit in lookupDescriptorID prevented the KV read that would have provided the corrected mapping — a self-reinforcing cycle. When getDescriptorByName resolves a system table name to an ID but the descriptor at that ID doesn't exist, evict the entry from the SystemDatabaseCache. The next lookup misses the cache, reads from KV, and self-heals. Fixes cockroachdb#169316 Release note (bug fix): Fixed a bug where PCR reader tenants could permanently fail authentication after SetupOrAdvanceStandbyReaderCatalog rewrote the system.privileges namespace entry. A stale cached name→ID mapping was never refreshed, causing every SQL connection to fail with "descriptor not found". Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
c92d572 to
96f70e1
Compare
Contributor
|
😎 Merged successfully - details. |
|
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. |
Member
fqazi
approved these changes
Apr 30, 2026
Collaborator
fqazi
left a comment
There was a problem hiding this comment.
@fqazi reviewed 6 files and all commit messages, and made 1 comment.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on spilchen).
f4183be
into
cockroachdb:release-26.2
22 of 23 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #169351 on behalf of @msbutler.
Summary
PR #169044 allowed
SystemDatabaseCacheto accept updated name→ID mappings,but the update path was never triggered because the stale cache hit in
lookupDescriptorIDprevented the KV read that would have provided thecorrected mapping — a self-reinforcing cycle.
When
getDescriptorByNameresolves a system table name to an ID but thedescriptor at that ID doesn't exist, evict the entry from the
SystemDatabaseCache. The next lookup misses the cache, reads from KV, andself-heals. This works across all nodes since the corrected namespace entry
is in shared KV storage.
Fixes #169316
Epic: none
Release note (bug fix): Fixed a bug where PCR reader tenants could
permanently fail authentication after
SetupOrAdvanceStandbyReaderCatalogrewrote the
system.privilegesnamespace entry. A stale cached name→IDmapping was never refreshed, causing every SQL connection to fail with
"descriptor not found".
Release justification: