Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schematelemetry: better redaction for invalid objects #126584

Closed
annrpom opened this issue Jul 2, 2024 · 0 comments · Fixed by #127195
Closed

schematelemetry: better redaction for invalid objects #126584

annrpom opened this issue Jul 2, 2024 · 0 comments · Fixed by #127195
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@annrpom
Copy link
Contributor

annrpom commented Jul 2, 2024

We log found invalid objects here

descID, ok := row[0].(*tree.DInt)
if !ok {
return errors.AssertionFailedf("expected id to be int (was %T)", row[0])
}
validationErr, ok := row[1].(*tree.DString)
if !ok {
return errors.AssertionFailedf("expected err to be string (was %T)", row[1])
}
log.Warningf(ctx, "found invalid object with ID %d: %q", descID, validationErr)

In our live-streamed logs, most of the information we need is redacted; so, we end up having to grab a debug zip

There might a better way to redact the validationErr so we do not have to do the dance above

Jira issue: CRDB-39987

Epic CRDB-39822

@annrpom annrpom added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Jul 2, 2024
@craig craig bot closed this as completed in 7bc3aa5 Jul 16, 2024
craig bot pushed a commit that referenced this issue Jul 17, 2024
127366: kv: deflake TestStoreRangeMergeWithData r=nvanbenschoten a=nvanbenschoten

Fixes #126249.

This commit deflakes the test by making sure that the merge transaction does not get aborted after each time we manually advance the clock to trigger a lease acquisition.

Release note: None

127381: schematelemetry: test that logs are redacted correctly r=rafiss a=rafiss

follow-up from #127195
informs: #126584
Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants