Skip to content

release-25.4: rowenc: fix panic in composite datum type checking#161746

Merged
trunk-io[bot] merged 1 commit intorelease-25.4from
blathers/backport-release-25.4-161739
Feb 3, 2026
Merged

release-25.4: rowenc: fix panic in composite datum type checking#161746
trunk-io[bot] merged 1 commit intorelease-25.4from
blathers/backport-release-25.4-161739

Conversation

@blathers-crl
Copy link
Copy Markdown

@blathers-crl blathers-crl Bot commented Jan 24, 2026

Backport 1/1 commits from #161739 on behalf of @ZhouXing19.


Fixes #161402

Previously, composite type checking assumed all values implemented tree.CompositeDatum, causing panics when this wasn't true. Use safe type assertion to check if datum is composite before calling IsComposite().

Release note: None


Release justification: fix for high severity stability issue that causes node crashes. A test failure revealed that incorrect type assumptions in rowenc can trigger panics when processing composite types, leading to node instability and potential service disruption.

Fixes #161402

Previously, composite type checking assumed all values implemented
tree.CompositeDatum, causing panics when this wasn't true. Use safe
type assertion to check if datum is composite before calling IsComposite().

Release note: None
@blathers-crl blathers-crl Bot force-pushed the blathers/backport-release-25.4-161739 branch from 15d38cc to dcc3d85 Compare January 24, 2026 23:27
@blathers-crl blathers-crl Bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Jan 24, 2026
@blathers-crl blathers-crl Bot requested a review from a team as a code owner January 24, 2026 23:27
@blathers-crl blathers-crl Bot requested review from ZhouXing19 and yuzefovich and removed request for a team January 24, 2026 23:27
@blathers-crl
Copy link
Copy Markdown
Author

blathers-crl Bot commented Jan 24, 2026

Thanks for opening a backport.

Before merging, please confirm that it falls into one of the following categories (select one):

  • Non-production code changes. Includes test-only changes, build system changes, etc.
  • Fixes for serious issues. Defined in the policy as correctness, stability, or security issues, data corruption/loss, significant performance regressions, breaking working and widely used functionality, or an inability to detect and debug production issues.
  • Other approved changes. These changes must be gated behind a disabled-by-default feature flag unless there is a strong justification not to.

Add a brief release justification to the PR description explaining your selection.

Also, confirm that the change does not break backward compatibility and complies with all aspects of the backport policy.

All backports must be reviewed by the TL and EM for the owning area.

@blathers-crl blathers-crl Bot added backport Label PR's that are backports to older release branches T-sql-queries SQL Queries Team labels Jan 24, 2026
@blathers-crl
Copy link
Copy Markdown
Author

blathers-crl Bot commented Jan 24, 2026

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.

@blathers-crl
Copy link
Copy Markdown
Author

blathers-crl Bot commented Jan 24, 2026

✅ PR #161746 is compliant with backport policy

Confidence: high
Critical bug criteria met: [Stability or security issues]
Backward compatible: true
Explanation: The pull request is compliant with the backport policy as it addresses a critical bug and includes a clear release justification description. The changes are made to a production file ('pkg/sql/rowenc/index_encoding.go') to address a significant stability issue in handling composite types, which was causing node crashes. This correction qualifies as fixing a stability issue under the backport policy's critical bug criteria. It uses a safer type assertion method to avoid panics when the datum is not a composite type. Such a fix directly improves the stability of the CockroachDB nodes and prevents service disruption, a compelling reason for a backport without the need for feature flags. The change is backward compatible as it does not introduce or remove existing functionality or version gates; instead, it refines the existing functionality by preventing unhandled conditions that lead to failures.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@ZhouXing19 ZhouXing19 requested a review from michae2 January 28, 2026 15:06
Copy link
Copy Markdown
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:

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

@ZhouXing19
Copy link
Copy Markdown
Collaborator

/trunk merge

@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented Feb 3, 2026

😎 Merged successfully - details.

@trunk-io trunk-io Bot merged commit 1d23d20 into release-25.4 Feb 3, 2026
19 checks passed
@trunk-io trunk-io Bot deleted the blathers/backport-release-25.4-161739 branch February 3, 2026 17:06
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 v25.4.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants