Skip to content

fix(disttae): preserve optimistic RC write dependencies across snapshot advances - #32174

Merged
XuPeng-SH merged 7 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/inventory-cas-clean-main
Nov 6, 2026
Merged

XuPeng-SH merged 7 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/inventory-cas-clean-main

Conversation

@VioletQwQ-0

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

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • BUG

Which issue(s) this PR fixes:

Related issue #29401 (closed as not planned for retired optimistic mode). This repairs the row-write conflict mechanism without restoring optimistic-mode product support or reopening the issue.

What this PR does / why we need it:

RC snapshot advancement can move TN's conflict fence past an earlier optimistic UPDATE. Preserve a separate CN write-validation watermark, validate existing writes before transfer/commit, and reject missing history conservatively. Transfer remains enabled; pessimistic/SI behavior and storage/wire formats are unchanged. R2/FOR UPDATE publication remains outside this PR.

The CI follow-up releases the idle canonical SQL fixture through its cleanup owner before starting each dedicated CAS cluster. The public RC regression now exercises shared cluster -> dedicated CAS cluster -> working shared cluster in one process. No test is skipped and the existing cluster admission guard remains intact.

Validation for 150373aa7501a206b744ea86d2ae9b27a07b39f7:

  • Dedicated CAS suite passes in normal and coverage-instrumented mode, including both commit orders, failed-validation/cancellation followed by COMMIT, exact final rows, real transfer, SI/pessimistic controls and clean restart.
  • The fixture-handoff public RC test passes twice in one process under race; scoped go vet, gofmt and git diff --check pass.
  • Dedicated real mo-tester BVT: 18/18 statements pass. Case: test/distributed/cases/optimistic/rc_write_dependency.sql / .result; ordinary CI excludes the retired optimistic directory.
  • Unchanged disttae production/UT content reuses the previously verified 633 normal and 633 race tests plus 100 repetitions of each new abnormal-path UT.
  • Previous head c7393620 failed normal UT and coverage UT because ten CAS roots could not acquire cluster ownership while the shared fixture remained active. Aggregate coverage was blocked by its prerequisite result; this was not a measured coverage-percentage failure.
  • Current-head GitHub CI is pending; local validation is not a CI PASS.

QA required: yes — transaction isolation, duplicate-key integrity, transfer and restart. Deployed multi-CN, crash-recovery, upgrade and performance qualification remain outstanding. PR review approval is still required.

@mergify

mergify Bot commented Nov 6, 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 mergify Bot Nov 6, 2026
@mergify

mergify Bot commented Nov 6, 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 6, 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 6, 2026

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

@VioletQwQ-0

Copy link
Copy Markdown
Collaborator Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

❌ Left the queue · checks failed

2 h 10 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Fri 6 Nov, 03:52 · rule main · triggered by @VioletQwQ-0 with the @mergifyio queue command
  • ❌ Checks failed · in place
  • 🚫 Left the queue 06:02 · d835c04

The failure is in this pull request. It failed tested alone on top of main.

Reason

The merge conditions cannot be satisfied due to failing checks

  • CI Required

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, 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

@mergify mergify Bot added the queued label Nov 6, 2026
@mergify mergify Bot added dequeued and removed queued labels Nov 6, 2026
@XuPeng-SH
XuPeng-SH merged commit b6c57d3 into matrixorigin:main Nov 6, 2026
@VioletQwQ-0
VioletQwQ-0 deleted the codex/inventory-cas-clean-main branch December 1, 2026 03:47

This branch was previously deployed

1 inactive deployment
ci — d835c04d Deployed Nov 6, 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/bug Something isn't working size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants