Repository navigation
test(arrowload): share static gate cluster fixture - #28961
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.
Force deep review 结果(当前 head 3d8af21):
未发现 actionable code defect。gate subtests 顺序执行,使用独立 CN connection/database name;policy 在 startup 前固定,nextCN 由顺序构造过程递增,无并发 race。subtest connection 会在 parent cluster cleanup 前关闭,FailNow 路径也覆盖;distributed case 先清理 database 再关闭 connection。fixture 提前生成不会影响 teardown。
原有两个 gate oracle 仍在:fallback test 覆盖 two-file loading,serialization 仍由 TestArrowLoadRolloutGateAllowsDefaultsAndSerializesWhenDistributedOff 覆盖。未发现 coverage regression。
结论:无 code blocker,建议等待 exact-head CI 完成后再 merge;性能收益尚未独立测量。自有 PR 按规则提交 COMMENT。
3d8af21 to
4f9e948
Compare
4f9e948 to
bb8b04f
Compare
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28960 ## What this PR does / why we need it: Reduce repeated embedded-cluster setup in the Arrow LOAD Race UT path while preserving the existing public-path oracles. - Keep the default BVT/fanout and ForceMaterialize fixture reuse already landed in the ArrowLoad test path. - Merge the explicit gate-disabled and distributed-disabled fallback scenarios into one test-owned 2-CN cluster, with independently named subtests and unchanged per-CN policies. - Generate static Arrow fixtures before cluster admission where they do not need a live cluster. - Make the two-session visibility test use an explicit single-connection transaction and close its worker on error, cancellation, and assertion-failure cleanup paths. - Register LocalStage cleanup immediately after stage creation so an intermediate assertion cannot leave catalog state behind. - Preserve RolloutRollbackDrain generations, BVT restart ordering, ForceMaterialize ownership modes/metrics, and all rollback/error oracles. The structural setup reduction is five independent fixtures to four and eight starts/admission acquisitions to seven. The cleanup follow-up improves reliability but is not claimed as a minute-level performance gain. The remaining CI wall time is dominated by runner-wide embedded-cluster admission contention; a stable <=5m result requires same-mode CI measurement and may require a separate admission/scheduling change. No production SQL behavior or global CI scheduling is changed. ### Validation - Rebased onto latest `main` (`091825aac2c8785d912f8d3eceb0e38de320e57a`). - Exact ArrowLoad test selection was non-empty. - Focused `TestArrowLoadBVT/(TwoSessionIsolation|LocalStage)` race passed (`17.420s`). - Full ArrowLoad package normal passed (`69.708s`). - Full ArrowLoad package race passed (`79.299s`). - Full package coverage command passed (`70.088s`); this test-only package reports `[no statements]`, which is not production coverage evidence. - `GOWORK=off go vet -mod=readonly ./pkg/tests/arrowload` passed. - Incremental `golangci-lint --new-from-rev origin/main ./pkg/tests/arrowload` passed with `0 issues`. - `gofmt` and `git diff --check` passed. - GPT-6 medium final review of the exact `091825...`-based diff approved (submission `01a0a800-95b0-7bd2-abb0-283838f8fb7f`); no P0/P1/P2 blocker. The official Race UT workflow must provide the same-mode before/after timing and current-head CI result; local package timing is not substituted for that evidence.
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28960 ## What this PR does / why we need it: Reduce repeated embedded-cluster setup in the Arrow LOAD Race UT path while preserving the existing public-path oracles. - Keep the default BVT/fanout and ForceMaterialize fixture reuse already landed in the ArrowLoad test path. - Merge the explicit gate-disabled and distributed-disabled fallback scenarios into one test-owned 2-CN cluster, with independently named subtests and unchanged per-CN policies. - Generate static Arrow fixtures before cluster admission where they do not need a live cluster. - Make the two-session visibility test use an explicit single-connection transaction and close its worker on error, cancellation, and assertion-failure cleanup paths. - Register LocalStage cleanup immediately after stage creation so an intermediate assertion cannot leave catalog state behind. - Preserve RolloutRollbackDrain generations, BVT restart ordering, ForceMaterialize ownership modes/metrics, and all rollback/error oracles. The structural setup reduction is five independent fixtures to four and eight starts/admission acquisitions to seven. The cleanup follow-up improves reliability but is not claimed as a minute-level performance gain. The remaining CI wall time is dominated by runner-wide embedded-cluster admission contention; a stable <=5m result requires same-mode CI measurement and may require a separate admission/scheduling change. No production SQL behavior or global CI scheduling is changed. ### Validation - Rebased onto latest `main` (`091825aac2c8785d912f8d3eceb0e38de320e57a`). - Exact ArrowLoad test selection was non-empty. - Focused `TestArrowLoadBVT/(TwoSessionIsolation|LocalStage)` race passed (`17.420s`). - Full ArrowLoad package normal passed (`69.708s`). - Full ArrowLoad package race passed (`79.299s`). - Full package coverage command passed (`70.088s`); this test-only package reports `[no statements]`, which is not production coverage evidence. - `GOWORK=off go vet -mod=readonly ./pkg/tests/arrowload` passed. - Incremental `golangci-lint --new-from-rev origin/main ./pkg/tests/arrowload` passed with `0 issues`. - `gofmt` and `git diff --check` passed. - GPT-6 medium final review of the exact `091825...`-based diff approved (submission `01a0a800-95b0-7bd2-abb0-283838f8fb7f`); no P0/P1/P2 blocker. The official Race UT workflow must provide the same-mode before/after timing and current-head CI result; local package timing is not substituted for that evidence.
What type of PR is this?
Which issue(s) this PR fixes:
issue #28960
What this PR does / why we need it:
Reduce repeated embedded-cluster setup in the Arrow LOAD Race UT path while preserving the existing public-path oracles.
The structural setup reduction is five independent fixtures to four and eight starts/admission acquisitions to seven. The cleanup follow-up improves reliability but is not claimed as a minute-level performance gain. The remaining CI wall time is dominated by runner-wide embedded-cluster admission contention; a stable <=5m result requires same-mode CI measurement and may require a separate admission/scheduling change.
No production SQL behavior or global CI scheduling is changed.
Validation
main(091825aac2c8785d912f8d3eceb0e38de320e57a).TestArrowLoadBVT/(TwoSessionIsolation|LocalStage)race passed (17.420s).69.708s).79.299s).70.088s); this test-only package reports[no statements], which is not production coverage evidence.GOWORK=off go vet -mod=readonly ./pkg/tests/arrowloadpassed.golangci-lint --new-from-rev origin/main ./pkg/tests/arrowloadpassed with0 issues.gofmtandgit diff --checkpassed.091825...-based diff approved (submission01a0a800-95b0-7bd2-abb0-283838f8fb7f); no P0/P1/P2 blocker.The official Race UT workflow must provide the same-mode before/after timing and current-head CI result; local package timing is not substituted for that evidence.