Repository navigation
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.
Deep self-review of current head cb7e868.
Scope: all 3 changed files and the complete fixture lifecycle.
- The two static policy scenarios share one 4-CN fixture but retain distinct CN policies, databases, subtest names, and metric/result oracles.
- Each SQL connection registers cleanup before the parent cluster cleanup; therefore child DB handles close before cluster teardown, including assertion/failure paths.
- BVT/restart remains on its dedicated lifecycle, so no later subtest depends on invalidated connections or restarted CN generation.
- Current required CI and Ubuntu UT/race evidence are green.
- No evidence-backed P0/P1/P2 finding.
Non-blocking note: four CNs remain alive instead of two, so the performance claim is reduced fixture startup/lifecycle overhead, not peak resident-memory reduction.
Decision: no blocker; comment-only because this is my own PR.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Force re-review for exact head cb7e868.
Re-read all 3 changed files and the complete lifecycle:
- The two static policy scenarios now share one four-CN fixture, but use distinct CN indices, policies, databases, and subtest oracles. CN0/CN1 retain borrow/materialize behavior; CN2/CN3 retain disabled-gate and distributed-soft-fallback behavior.
- The fixture is registered for cleanup, SQL handles are registered before cluster cleanup, and the separate restart/BVT lifecycle is not merged into this static-policy fixture.
- The change reduces repeated fixture startup/lifecycle overhead; it does not claim reduced peak resident memory because four CNs remain alive.
- Required CI and Ubuntu UT/SCA evidence are green, and the PR is mergeable without conflicts; it is only behind the base branch.
No evidence-backed P0/P1/P2 blocker found. Comment-only because this is the review requester's own PR.
## Summary - Consolidate the two static Arrow policy scenarios into one test-scoped four-CN fixture. - Keep ForceMaterialize borrow/materialize and GateDisabled/distributed-fallback on separate CNs and databases. - Keep BVT, restart, and rollout/drain tests on their existing dedicated lifecycles. ## Why Race UT evidence from matrixorigin#28956 and matrixorigin#28885 shows that the apparently slow Arrow cases spend most of their time waiting for embedded-cluster admission and service startup. The global cluster admission lock is an intentional resource-safety boundary; this change reduces one compatible lifecycle instead of bypassing that lock or increasing default cluster concurrency. The two static policy matrices are independent, have no restart/fault boundary, and use disjoint state. Sharing their lifecycle removes one cluster admission/start/close cycle without removing a policy mode, assertion, or behavioral case. ## Coverage and lifecycle safety - CN0: Arrow enabled, S3 enabled, distributed enabled, borrow path. - CN1: Arrow enabled, S3 enabled, distributed enabled, ForceMaterialize path. - CN2: Arrow disabled, S3 enabled, distributed enabled, gate-disabled path. - CN3: Arrow enabled, S3 enabled, distributed disabled, soft-fallback path. - The fixture is owned by the combined test and closed with `t.Cleanup` before later package tests acquire the global admission lock. - Startup rollback retains cleanup ownership when `StartTestCluster` returns a non-nil cluster with an error. The former focused test names are preserved as nested subtests: `TestArrowLoadStaticPolicyModes/TestArrowLoadForceMaterializeFallback` `TestArrowLoadStaticPolicyModes/TestArrowLoadGateModes` ## Validation - Baseline, two independent race lifecycles: package elapsed `32.538s`. - Combined static-policy race test: `15.867s` in the final focused run; earlier A/B package elapsed `17.39s`. - Full `pkg/tests/arrowload` race run on the lifecycle consolidation: passed, package elapsed `74.612s`, wall `90.21s`. - Final focused command: `GOWORK=off go test -mod=readonly -race -json ./pkg/tests/arrowload -run '^TestArrowLoadStaticPolicyModes$' -count=1`. This PR does not claim that one local package run proves the entire 70-minute race-UT suite improvement; CI should measure the constrained-runner effect and memory impact of the four-CN fixture.
## Summary - Consolidate the two static Arrow policy scenarios into one test-scoped four-CN fixture. - Keep ForceMaterialize borrow/materialize and GateDisabled/distributed-fallback on separate CNs and databases. - Keep BVT, restart, and rollout/drain tests on their existing dedicated lifecycles. ## Why Race UT evidence from matrixorigin#28956 and matrixorigin#28885 shows that the apparently slow Arrow cases spend most of their time waiting for embedded-cluster admission and service startup. The global cluster admission lock is an intentional resource-safety boundary; this change reduces one compatible lifecycle instead of bypassing that lock or increasing default cluster concurrency. The two static policy matrices are independent, have no restart/fault boundary, and use disjoint state. Sharing their lifecycle removes one cluster admission/start/close cycle without removing a policy mode, assertion, or behavioral case. ## Coverage and lifecycle safety - CN0: Arrow enabled, S3 enabled, distributed enabled, borrow path. - CN1: Arrow enabled, S3 enabled, distributed enabled, ForceMaterialize path. - CN2: Arrow disabled, S3 enabled, distributed enabled, gate-disabled path. - CN3: Arrow enabled, S3 enabled, distributed disabled, soft-fallback path. - The fixture is owned by the combined test and closed with `t.Cleanup` before later package tests acquire the global admission lock. - Startup rollback retains cleanup ownership when `StartTestCluster` returns a non-nil cluster with an error. The former focused test names are preserved as nested subtests: `TestArrowLoadStaticPolicyModes/TestArrowLoadForceMaterializeFallback` `TestArrowLoadStaticPolicyModes/TestArrowLoadGateModes` ## Validation - Baseline, two independent race lifecycles: package elapsed `32.538s`. - Combined static-policy race test: `15.867s` in the final focused run; earlier A/B package elapsed `17.39s`. - Full `pkg/tests/arrowload` race run on the lifecycle consolidation: passed, package elapsed `74.612s`, wall `90.21s`. - Final focused command: `GOWORK=off go test -mod=readonly -race -json ./pkg/tests/arrowload -run '^TestArrowLoadStaticPolicyModes$' -count=1`. This PR does not claim that one local package run proves the entire 70-minute race-UT suite improvement; CI should measure the constrained-runner effect and memory impact of the four-CN fixture.
Summary
Why
Race UT evidence from #28956 and #28885 shows that the apparently slow Arrow cases spend most of their time waiting for embedded-cluster admission and service startup. The global cluster admission lock is an intentional resource-safety boundary; this change reduces one compatible lifecycle instead of bypassing that lock or increasing default cluster concurrency.
The two static policy matrices are independent, have no restart/fault boundary, and use disjoint state. Sharing their lifecycle removes one cluster admission/start/close cycle without removing a policy mode, assertion, or behavioral case.
Coverage and lifecycle safety
t.Cleanupbefore later package tests acquire the global admission lock.StartTestClusterreturns a non-nil cluster with an error.The former focused test names are preserved as nested subtests:
TestArrowLoadStaticPolicyModes/TestArrowLoadForceMaterializeFallbackTestArrowLoadStaticPolicyModes/TestArrowLoadGateModesValidation
32.538s.15.867sin the final focused run; earlier A/B package elapsed17.39s.pkg/tests/arrowloadrace run on the lifecycle consolidation: passed, package elapsed74.612s, wall90.21s.GOWORK=off go test -mod=readonly -race -json ./pkg/tests/arrowload -run '^TestArrowLoadStaticPolicyModes$' -count=1.This PR does not claim that one local package run proves the entire 70-minute race-UT suite improvement; CI should measure the constrained-runner effect and memory impact of the four-CN fixture.