Skip to content

test(function): exclude JSON_OVERLAPS allocation check under race - #26215

Closed
gouhongshen wants to merge 1 commit into
matrixorigin:mainfrom
gouhongshen:agent/issue-26214
Closed

gouhongshen wants to merge 1 commit into
matrixorigin:mainfrom
gouhongshen:agent/issue-26214

Conversation

@gouhongshen

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #26214

What this PR does / why we need it:

TestJSONOverlapsAccessorAllocationsDoNotScaleWithRows uses
testing.AllocsPerRun around the complete 8192-row JSON_OVERLAPS execution.
Under race instrumentation, process-wide and instrumentation-dependent
allocation deltas can be attributed to that long execution and make the
allocation-only assertion fail unrelated pull requests. PR #26196 observed
one=0, many=187, while contemporaneous runs passed with unchanged function
code.

Move the allocation-statistics-only test unchanged into a dedicated
//go:build !race test file, following the established fix in #25915 for the
same failure mode.

This keeps:

  • the 1-row versus 8192-row allocation regression assertion in non-race builds;
  • all JSON_OVERLAPS functional tests in both race and non-race builds;
  • production code and JSON_OVERLAPS behavior unchanged.

Validation

  • Non-race allocation test, 20 repetitions.
  • Race-built test list confirms the allocation-only test is excluded.
  • Focused JSON_OVERLAPS functional tests under -race.
  • Full pkg/sql/plan/function package tests.
  • Full pkg/sql/plan/function package tests under -race.
  • git diff --check.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@gouhongshen

Copy link
Copy Markdown
Contributor Author

Superseded by merged PR #26207 (commit 251dcfefc). That commit already moved TestJSONOverlapsAccessorAllocationsDoNotScaleWithRows unchanged into func_builtin_json_overlap_alloc_test.go with //go:build !race and removed it from the race-built test file. Rebasing this PR would therefore produce no functional diff; closing instead of preserving duplicate code.

This branch was previously deployed

1 inactive deployment
ci — f013de1f Deployed Jul 27, 2026 by gouhongshen via Matrixone Utils CI / Coverage #42678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: JSON_OVERLAPS allocation test flakes under race instrumentation

2 participants