Skip to content

Conversation

michae2
Copy link
Collaborator

@michae2 michae2 commented Oct 17, 2025

Backport 1/2 commits from #155035.

/cc @cockroachdb/release


opt/props: only check histogram NumRange=0 in test builds

These assertions that the first histogram bucket has NumRange=0 are
useful for catching bugs, but a liability in production
environments. Even with malformed histograms, we should not be failing
query execution. Only check these assertions in test builds.

Informs: #154461

Release note (bug fix): Change assertions about histogram NumRange=0 to
only be checked in test builds.


Release justification: low-risk fix for a critical support issue.

These assertions that the first histogram bucket has NumRange=0 are
useful for catching bugs, but a liability in production
environments. Even with malformed histograms, we should not be failing
query execution. Only check these assertions in test builds.

Informs: cockroachdb#154461

Release note (bug fix): Change assertions about histogram NumRange=0 to
only be checked in test builds.
@michae2 michae2 requested review from a team and yuzefovich October 17, 2025 19:04
@blathers-crl
Copy link

blathers-crl bot commented Oct 17, 2025

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 Oct 17, 2025
@blathers-crl
Copy link

blathers-crl bot commented Oct 17, 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

@blathers-crl
Copy link

blathers-crl bot commented Oct 17, 2025

✅ PR #155651 is compliant with backport policy

Confidence: high
Critical bug criteria met: [Stability or security issues Bugs that can cause the DB to return incorrect results or result in suboptimal performance]
Backward compatible: true
Explanation: The PR introduces a modification which ensures that certain assertions related to the 'NumRange' of histogram buckets are only checked in test builds, thus not affecting production systems. The primary change is in making this check available only in a test environment to avoid query failures due to malformed histograms in production. This aligns with improving system stability and avoiding unnecessary failures, making it a critical bug fix. The changes in the PR do not appear to require a new feature flag because they are specifically targeted at coding changes that prevent potential disruptions in production. While there is the addition of a test-only check, it does not alter the production functionality or introduce backward-incompatible changes. This change makes the system more robust without altering its expected functional behaviors outside of testing scenarios.

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

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

@yuzefovich reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @michae2)

@michae2 michae2 merged commit cd8866e into cockroachdb:release-25.2 Oct 20, 2025
16 checks passed
@michae2 michae2 deleted the backport25.2-155035 branch October 20, 2025 17:13
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 T-sql-queries SQL Queries Team target-release-25.2.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants