Skip to content

test(ci): isolate shared fixtures and align observation barriers - #31938

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/ci-ut-systemic-20261030
Oct 31, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/ci-ut-systemic-20261030

Conversation

@XuPeng-SH

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:

Refs #31781 (publication scenario budget; separate quoted-default cleanup timeout remains unproven)
Refs #31696 (cross-CN observer precondition)
Refs #31790 (normal-path flush publication precondition; historical cause remains unproven)
Refs #29249

What this PR does / why we need it:

Independent snapshot/publication subtests shared a deadline, so earlier successful siblings could leave later cases already canceled. A failed sibling could also leave catalog state for the next case. Give each scenario its own bounded context, cancel the setup context promptly, and stop the loop after a failed scenario so the shared fixture can quarantine it. Retain the original scenarios, SQL/restore oracles and cleanup.

The concurrent cross-CN CREATE test now waits for CN0 to apply CN1's post-commit frontier before its first SHOW, preserves both competing schedules, verifies the actual foreign-key error, and treats cleanup failure as a fixture failure. This establishes the test's observation precondition; it does not claim immediate cross-CN read-after-write without a barrier.

Arrow tests now bind databases in connection DSNs rather than relying on USE surviving pool replacement; pin explicit-transaction and two-session connections, check distinct IDs, and join worker cleanup. A controlled reconnect proves the unscoped connection loses USE and returns 1046 after eviction, whereas the schema-scoped replacement executes and reads back an Arrow LOAD. Socket timeout in the two-session test bounds an individual idle read/write, not the total lifetime under continuously trickling bytes. Preserve the failure, rollback, cancellation, and restart assertions.

The decimal historical DUMP test now requires a nonempty successful TN flush response and waits for the same CN to apply a logtail read barrier before its original first DUMP. All five historical round-trip scenarios and the immutable-object rejection remain intact. This establishes the normal-path publication precondition; it does not detect the separate flush-queue error falsely reported as success or establish the cause of the historical CI occurrence.

Combine nine independent HEX queries per SQL mode in quoted-default ALTER checks into one projection while preserving each expected byte value and SHOW replay checks: 36 to 4 queries. This is a structural count, not an asserted end-to-end CI speedup.

Validation on base 4183159a877e27049a392906ea2c3ae07edcdd42 (Linux/amd64, Go 1.27.1):

  • Race: complete pkg/tests/arrowload passes, including connection eviction, two sessions, cancellation and restart. All three changed publication roots pass; empty-publication passes twice in one process. Cross-CN CREATE passes three times in one process. The five historical decimal DUMP scenarios and flush-result controls pass.
  • Normal: full pkg/embed, pkg/tests/issues and pkg/tests/arrowload pass. Full pkg/tests/sqlintegration passed before the test-local decimal change; all five changed decimal scenarios and flush-result controls then pass on the final content. -short -tags=matrixone_test throughout; embedded environment skips are not treated as passes.
  • Cross-CN CREATE passes covermode=set with the current filtered 478-package instrumentation list; this focused run is not a full coverage job and differs from the historical 476-package runner.
  • Controlled negative overlays confirm old shared setup context cancels a child, canceled synthetic frontier fails without executing SHOW, post-snapshot failure cleans snapshot/publication/database before quarantine, and canceled flush barrier does not execute DUMP. These are expected failures, not ordinary green tests or proof of real delayed logtail scheduling.
  • Changed Go files pass gofmt; affected packages pass go vet, pinned molint and configured golangci-lint 2.14.0 (0 issues after repository filters). gpt-6.1-terra / max design and independent overall review completed.
  • One same-flags paired local sample: quoted test scenario body 7.764s before / 6.838s after; startup/package times varied substantially. This does not establish a whole-CI time improvement.

#31491 (route convergence), #31545 and the cleanup half of #31781 remain separately unresolved; no common root is inferred. #31744, #31239 and #29427 have relevant repairs already present on main and are not changed here. The 4.1.6-hotfix #30985 needs branch-specific diagnosis. New CI is pending.

@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 →

@XuPeng-SH

XuPeng-SH commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: fa3917f0c66fb0e012b2e9014bed52fd5984df0c

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: fa3917f0c66fb0e012b2e9014bed52fd5984df0c

Assessment: approve

The test isolation and observation-ordering changes preserve existing behavioral checks. No actionable regressions remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

Validation:

  • Isolation preflight and repository-owned native build passed.

  • Eight selected test roots across four packages passed; see focused-normal.stdout.jsonl and checks/1793393488885666360-3.json.

  • Five selected Arrow transaction/reconnect and cross-CN cases passed with -race; see focused-race.stdout.jsonl and checks/1793393836042401212-3.json.

  • Final audit verified unchanged source, 193 native inputs, complete discussion coverage, receipts and log hashes; see validation-audit.json.

Limitations:

  • LocalMinIO was skipped because its executable was unavailable; S3-specific cancellation was not locally exercised.

  • Local validation was focused, not full-package coverage. Supplied CI evidence remained incomplete.

  • These results do not establish that all historical intermittent failures or separate cleanup issues are fixed.

This branch was successfully deployed

No deployments
ci — fe218c94 Deployed Oct 31, 2026 by XuPeng-SH
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/enhancement 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.

2 participants