You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: JSON_OVERLAPS allocation regression test is flaky under -race #26243
TestJSONOverlapsAccessorAllocationsDoNotScaleWithRows uses testing.AllocsPerRun to assert that accessor allocations do not scale with row count. Exact allocation counts are not stable under race instrumentation and can be contaminated by race/runtime background allocations, causing a false-positive UT failure even though the JSON_OVERLAPS behavior is correct.
TestJSONOverlapsAccessorAllocationsDoNotScaleWithRows
"29" is not less than or equal to "10"
accessor allocations must be batch-scoped: one=0.000000 many=29.000000
The coverage UT in the same workflow passed.
Reproduction / evidence
The same deterministic CGo race command was run against both the PR merge commit and its clean base:
PR merge 827a97406: 5/5 passed
base 58299628c: 5/5 passed
This confirms the failure is intermittent rather than caused by the parser changes in #26236.
Expected behavior
Allocation-count regression assertions should remain active in ordinary and coverage UTs, while race UTs should continue to cover JSON_OVERLAPS functional behavior without relying on unstable exact allocation counts.
Proposed fix
Move the allocation-only test into a //go:build !race test file, following the existing pattern in func_json_merge_alloc_test.go. Keep all JSON_OVERLAPS functional tests enabled in both normal and race builds.
Activity