Repository navigation
test(function): exclude JSON allocation check under race - #25915
mergify[bot] merged 2 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
No blocking findings on the latest head.
This keeps the allocation-regression assertion in non-race builds, leaves the JSON merge functional coverage in both race and non-race configurations, and does not change production code or JSON merge behavior. I do not see a correctness, closure, or unhappy-path issue with moving this allocator-sensitivity check behind !race.
Merge Queue Status
This pull request spent 59 minutes 7 seconds in the queue, including 58 minutes 29 seconds running CI. Required conditions to merge
|
…n#25915) ### Root cause `TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows` measures the complete 8192-row JSON merge path with `testing.AllocsPerRun(3)`, even though its asserted invariant is wrapper allocation behavior. Under `-race`, that path also executes instrumented and race-build-only vector operations, so process-wide allocation deltas outside the intended invariant can be charged to the test. The same package source passed the Ubuntu/x86 race UT in matrixorigin#25728, then failed an unrelated PR in matrixorigin#25911 with `one=1, many=45`. matrixorigin#25911 only changes the HAKeeper client and its tests, which run in a separate package test binary. ### Fix Move the allocation-statistics-only test unchanged into a `!race` test file. This keeps: - the 1-row versus 8192-row allocation regression assertion in non-race builds; - all JSON merge functional tests in both race and non-race builds; - production code and JSON merge behavior unchanged. ### Validation ```text .agents/skills/mo-dev/scripts/mo-cgo-test -v -count=100 -timeout=10m \ -run '^TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows$' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$|PatchWrapperAllocationsDoNotScaleWithRows$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=20m \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30m \ ./pkg/sql/plan/function ``` The race-built test list was also checked to confirm that only the allocation-statistics test is excluded. Approved by: @XuPeng-SH
…n#25915) ### Root cause `TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows` measures the complete 8192-row JSON merge path with `testing.AllocsPerRun(3)`, even though its asserted invariant is wrapper allocation behavior. Under `-race`, that path also executes instrumented and race-build-only vector operations, so process-wide allocation deltas outside the intended invariant can be charged to the test. The same package source passed the Ubuntu/x86 race UT in matrixorigin#25728, then failed an unrelated PR in matrixorigin#25911 with `one=1, many=45`. matrixorigin#25911 only changes the HAKeeper client and its tests, which run in a separate package test binary. ### Fix Move the allocation-statistics-only test unchanged into a `!race` test file. This keeps: - the 1-row versus 8192-row allocation regression assertion in non-race builds; - all JSON merge functional tests in both race and non-race builds; - production code and JSON merge behavior unchanged. ### Validation ```text .agents/skills/mo-dev/scripts/mo-cgo-test -v -count=100 -timeout=10m \ -run '^TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows$' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$|PatchWrapperAllocationsDoNotScaleWithRows$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=20m \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30m \ ./pkg/sql/plan/function ``` The race-built test list was also checked to confirm that only the allocation-statistics test is excluded. Approved by: @XuPeng-SH
…n#25915) ### Root cause `TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows` measures the complete 8192-row JSON merge path with `testing.AllocsPerRun(3)`, even though its asserted invariant is wrapper allocation behavior. Under `-race`, that path also executes instrumented and race-build-only vector operations, so process-wide allocation deltas outside the intended invariant can be charged to the test. The same package source passed the Ubuntu/x86 race UT in matrixorigin#25728, then failed an unrelated PR in matrixorigin#25911 with `one=1, many=45`. matrixorigin#25911 only changes the HAKeeper client and its tests, which run in a separate package test binary. ### Fix Move the allocation-statistics-only test unchanged into a `!race` test file. This keeps: - the 1-row versus 8192-row allocation regression assertion in non-race builds; - all JSON merge functional tests in both race and non-race builds; - production code and JSON merge behavior unchanged. ### Validation ```text .agents/skills/mo-dev/scripts/mo-cgo-test -v -count=100 -timeout=10m \ -run '^TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows$' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$|PatchWrapperAllocationsDoNotScaleWithRows$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=20m \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30m \ ./pkg/sql/plan/function ``` The race-built test list was also checked to confirm that only the allocation-statistics test is excluded. Approved by: @XuPeng-SH
…n#25915) ### Root cause `TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows` measures the complete 8192-row JSON merge path with `testing.AllocsPerRun(3)`, even though its asserted invariant is wrapper allocation behavior. Under `-race`, that path also executes instrumented and race-build-only vector operations, so process-wide allocation deltas outside the intended invariant can be charged to the test. The same package source passed the Ubuntu/x86 race UT in matrixorigin#25728, then failed an unrelated PR in matrixorigin#25911 with `one=1, many=45`. matrixorigin#25911 only changes the HAKeeper client and its tests, which run in a separate package test binary. ### Fix Move the allocation-statistics-only test unchanged into a `!race` test file. This keeps: - the 1-row versus 8192-row allocation regression assertion in non-race builds; - all JSON merge functional tests in both race and non-race builds; - production code and JSON merge behavior unchanged. ### Validation ```text .agents/skills/mo-dev/scripts/mo-cgo-test -v -count=100 -timeout=10m \ -run '^TestJsonMergePatchWrapperAllocationsDoNotScaleWithRows$' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=20 -timeout=10m \ -run '^TestJsonMerge($|DepthValidation$|PatchWrapperAllocationsDoNotScaleWithRows$)' \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=20m \ ./pkg/sql/plan/function .agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30m \ ./pkg/sql/plan/function ``` The race-built test list was also checked to confirm that only the allocation-statistics test is excluded. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #25914
What this PR does / why we need it:
Root cause
TestJsonMergePatchWrapperAllocationsDoNotScaleWithRowsmeasures the complete 8192-row JSON merge path withtesting.AllocsPerRun(3), even though its asserted invariant is wrapper allocation behavior. Under-race, that path also executes instrumented and race-build-only vector operations, so process-wide allocation deltas outside the intended invariant can be charged to the test.The same package source passed the Ubuntu/x86 race UT in #25728, then failed an unrelated PR in #25911 with
one=1, many=45. #25911 only changes the HAKeeper client and its tests, which run in a separate package test binary.Fix
Move the allocation-statistics-only test unchanged into a
!racetest file.This keeps:
Validation
The race-built test list was also checked to confirm that only the allocation-statistics test is excluded.