Skip to content

test: cover primary key COPY ALTER publication - #32395

Merged
XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-28319-main-regression-20261109
Nov 10, 2026
Merged

XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-28319-main-regression-20261109

Conversation

@VioletQwQ-0

@VioletQwQ-0 VioletQwQ-0 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • Test and CI

Which issue(s) this PR fixes:

Part of #28319. This PR adds regression coverage and does not close the issue.

What this PR does / why we need it:

Add real SQL regression coverage for ADD/DROP PRIMARY KEY COPY ALTER across independent-table publication, concurrent source writes and bounded refresh, publication contention, stale same-table preparation, server-side cancellation, and injected publication or refresh failures. Compare the complete ordered (id,v) rows, including duplicates, and verify primary-key definitions in the relevant terminal paths. A SQL counterexample demonstrates that the previous pair of count assertions accepted a missing row replaced by a duplicate.

Reuse the existing internal SQL executor test observer; its completed INSERT SELECT count is not a complete physical-copy or transaction-retry measurement. The BVT covers historical reads, a view, allocator behavior, foreign-key metadata and enforcement, and transaction rollback, and removes an existing named snapshot before setup. This PR contains no production protocol changes. The previous candidate is #28418.

Validation on base c99234dcf4c94d1ff9d372917cd35041f1a3a682, candidate 94a2f3822ccf16208d4aa0cb9a181e6b1adfb9db:

  • Local Darwin/arm64 normal tests: 18 top-level cases passed, including the duplicate-row counterexample.
  • Local Darwin/arm64 -race -json: 18 top-level cases passed; maximum 6.31 seconds. New-head Ubuntu CI and its per-test timing remain pending.
  • Incremental golangci-lint and go vet for pkg/tests/issues passed locally. The previous head's SCA failure was caused by a redundant loop-variable copy; that copy is removed.
  • BVT normal SQL/result comparison: a preexisting snapshot was seeded; two consecutive runs on the same isolated service each passed 36/36 statements with no failures, ignored statements, or abnormal results. Service termination and configured-port release were independently checked. This evidence is reused from the preceding head because the BVT inputs and production/native sources are unchanged.

The previous head's local race run had two timing failures (103.25 and 51.83 seconds) under heavy observed system load; the cause was not established. Those results remain historical, not passing evidence for that head or this one.

Physical write overlap and comprehensive physical-copy/transaction-retry observation are not established by these tests. The fixed B/M performance run, three TKE nightly replays, and their cleanup/QA evidence remain pending under #28319. Earlier Ubuntu smoke and old PR measurements are historical and do not validate this head.

QA required: yes — this is partial regression coverage; remaining performance and distributed nightly validation are tracked by #28319.

@XuPeng-SH

XuPeng-SH commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: 94a2f3822ccf16208d4aa0cb9a181e6b1adfb9db

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

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: 94a2f3822ccf16208d4aa0cb9a181e6b1adfb9db

Assessment: approve

The tests cover selected COPY ALTER publication, refresh, cancellation and failure paths with complete ordered row comparisons. They reuse existing cluster and observer capabilities without changing production behavior. No actionable findings remain.

Model: gpt-6.1-sol / max

Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0

Validation:

  • Reviewed all three added files, relevant owners/consumers and linked issue context; reconciled both discussion entries.

  • All 18 new tests passed normally and with -race. Seventeen exact adaptive stress selections passed 299 repeated executions.

  • A temporary public MySQL probe matched the 36 committed SQL/result statements twice, including preexisting-snapshot recovery and explicit teardown checks.

  • go vet, gofmt, diff --check, preflight and native-input verification passed. validation-audit.json reconciles 27 local receipts/logs; source remains unchanged.

  • Reused the supplied current-head Ubuntu UT success for broader CI coverage.

Limitations:

  • The public SQL probe is not a mo-tester invocation; reported mo-tester runs are reused for unchanged BVT inputs. Raw per-test CI artifacts were not supplied.

  • Physical-copy overlap, complete transaction-retry accounting and remaining performance/TKE/QA validation stay under #28319; this partial regression PR does not close that issue.

@mergify

mergify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Queue requested — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 Pull request from fork cannot be queued

Details

This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
The author needs to enable "Allow edits from maintainers" on this pull request.

@matrixorigin matrixorigin deleted a comment from qodo-code-review Bot Nov 10, 2026
@mergify

mergify Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 Pull request from fork cannot be queued

Details

This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
The author needs to enable "Allow edits from maintainers" on this pull request.

1 similar comment
@mergify

mergify Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 Pull request from fork cannot be queued

Details

This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
The author needs to enable "Allow edits from maintainers" on this pull request.

@VioletQwQ-0

Copy link
Copy Markdown
Collaborator Author

@Mergifyio refresh

@mergify

mergify Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🛑 Queue command cancelled

Queue requested — the merge queue status continues in this comment ↓.

@mergify mergify Bot added the queued label Nov 10, 2026
@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue · pull request dequeued

47 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Tue 10 Nov, 04:03 · rule main · triggered by a @mergifyio queue command
  • ⏹️ Testing stopped · in place
  • 🚫 Left the queue 04:50 · e8887b1

Reason

Pull request #32395 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

To get back in the queue

  • Push a change if one is needed: the pull request is queued again once its queue conditions match.
  • If no change is needed, tick the box below to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub branch protection:
    • check-neutral = CI Required
    • check-skipped = CI Required
    • check-success = CI Required

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request
2 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection

Times in UTC · dashboard · how the merge queue works

This branch was previously deployed

1 inactive deployment
ci — e8887b1d Deployed Nov 10, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dequeued kind/test-ci size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants