Skip to content

Conversation

@yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Dec 22, 2025

Backport 1/1 commits from #159964 on behalf of @yuzefovich.


Every query that we run via the internal executor comes with "opName" string that is a short description of the query. We now will attach that string as a pprof label that can then be propagated into stack traces.

Epic: None
Release note: None


Release justification: low-risk debugging improvement.

@yuzefovich yuzefovich force-pushed the blathers/backport-release-26.1-159964 branch from ce064ee to 30573ac Compare December 22, 2025 20:44
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Dec 22, 2025
@blathers-crl blathers-crl bot requested a review from mgartner December 22, 2025 20:44
@blathers-crl
Copy link

blathers-crl bot commented Dec 22, 2025

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.

@blathers-crl blathers-crl bot added backport Label PR's that are backports to older release branches T-sql-queries SQL Queries Team labels Dec 22, 2025
@blathers-crl
Copy link

blathers-crl bot commented Dec 22, 2025

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.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich requested review from michae2 and removed request for mgartner December 22, 2025 20:53
"stmt.no.constants", stmtNoConstants,
}
if opName, ok := GetInternalOpName(ctx); ok {
labels = append(labels, "opname", opName)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized we can pre-allocate and extra slot in the []string to avoid the extra allocation on append, but probably not worth it given that is is within the profiling code path only.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I also thought about this initially and had the same reasoning (slow path anyway) for not doing that. But given you mentioned it too and it's easy enough to avoid, done.

Every query that we run via the internal executor comes with "opName"
string that is a short description of the query. We now will attach that
string as a pprof label that can then be propagated into stack traces.

Release note: None
@yuzefovich yuzefovich force-pushed the blathers/backport-release-26.1-159964 branch from 30573ac to 99ec795 Compare December 22, 2025 23:06
Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Nice idea!

@michae2 reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner).

@yuzefovich
Copy link
Member Author

TFTRs!

@yuzefovich yuzefovich merged commit 3432e27 into cockroachdb:release-26.1 Dec 23, 2025
16 of 17 checks passed
@yuzefovich yuzefovich deleted the blathers/backport-release-26.1-159964 branch December 23, 2025 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-sql-queries SQL Queries Team target-release-26.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants