cache: mark cache panic messages as redact.Safe#5829
Merged
annrpom merged 1 commit intocockroachdb:masterfrom Mar 9, 2026
Merged
cache: mark cache panic messages as redact.Safe#5829annrpom merged 1 commit intocockroachdb:masterfrom
annrpom merged 1 commit intocockroachdb:masterfrom
Conversation
Member
Contributor
Author
|
would we be interested in getting claude to audit our pebble repo for this pattern? this PR was motivated by the tagged sentry report - was just trying to triage them in passing |
Previously, panic messages in the cache package containing ref counts were being redacted when surfaced in CockroachDB logs, making it impossible to diagnose cache value ref counting issues. Wrap the panic format strings with errors.AssertionFailedf() so the full message (including the ref count) is visible in redacted logs. Informs: cockroachdb/cockroach#164740. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
9750e37 to
c459dd0
Compare
RaduBerinde
approved these changes
Mar 9, 2026
Member
RaduBerinde
left a comment
There was a problem hiding this comment.
LGTM
We could add a linter that disallows panic(fmt.Sprintf())
Contributor
Author
|
TFTR! ('-')7 sgtm - i'll get claude to cook that up during some downtime |
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.
Previously, panic messages in the cache package containing ref counts were being redacted when surfaced in CockroachDB logs, making it impossible to diagnose cache value ref counting issues.
Wrap the panic format strings with redact.Safe() so the full message (including the ref count) is visible in redacted logs.
Informs: cockroachdb/cockroach#164740.
Co-Authored-By: roachdev-claude roachdev-claude-bot@cockroachlabs.com