Skip to content

docs: revert sidecar design and propose collation key reuse - #28842

Merged
XuPeng-SH merged 8 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-28164-collation-redesign
Sep 15, 2026
Merged

XuPeng-SH merged 8 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-28164-collation-redesign

Conversation

@VioletQwQ-0

@VioletQwQ-0 VioletQwQ-0 commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #28164

What this PR does / why we need it:

This PR records the reviewed replacement for the sidecar proposal and the current native-0900 integration status. The design reuses existing unique-index tables, hidden physical primary keys, tuple framing, and transaction/index maintenance paths. User-visible string values remain in the base row; comparison identities and physical key format are carried by schema/index metadata.

The implementation is kept in a separate branch:

The implementation repair includes:

  • ALTER COPY dedup comparing effective collation identity, key expression/prefix and physical key format, so semantic or encoding changes cannot reuse an old uniqueness proof.
  • Hidden physical primary-key rebuilding computing the final table format after schema conversion and preserving the native format for a string-PK-only table; index aliases and unknown references are handled explicitly.
  • Expression collation provenance and coercibility propagation, including ordinary string functions inheriting their string input, CONCAT preserving an explicit identity when inputs resolve to the same identity, and equal-rank non-binary conflicts remaining errors.
  • Row-value IN deriving each corresponding field independently instead of mixing all tuple fields.
  • A physical-identity guard that keeps predicates with a mismatched explicit collation as residual filters instead of rewriting them to a native hidden-primary-key lookup.
  • Legacy hash behavior remaining bytewise and accepting legacy raw bytes; native 0900 hash paths alone validate UTF-8 and generate weights.
  • The local and remote temporary default-closed fences checking native expressions, columns, relation/index formats and folded native plans. This is not the durable mixed-version cluster gate; production native-0900 activation remains prohibited.

The native backend candidate is fixed to Vitess v0.24.0 at e8d9fa81d351066497a8d99f92e9e9f2ecfd69d0. Historical v0.22.1/Go 1.24.4/MO 86c030d6b2 experiment data is kept as historical evidence and is not relabeled as v0.24.0 validation.

Review status

An Astra-medium sub-agent performed three review rounds using mo-self-review and mo-pr-preflight-review, including complete producer/consumer and failure-path checks plus historical CR mechanisms from #28076, #27252, #25881 and #25879. The final review verdict for the repair scope is PASS: no confirmed P1/P2 or merge blocker remains in the reviewed changes. The review still records the activation and end-to-end items below as NOT_RUN.

Validation

PASS at implementation head 993957c232ac29e81009bb94275734b4f5d8786f:

  • Full pkg/common/hashmap, pkg/sql/plan, pkg/sql/compile and pkg/pb/plan package tests as applicable; plan and compile use the repository CGo wrapper.
  • Full and focused race tests for hashmap, plan and compile; focused collation regressions ran with repeated iterations.
  • Regression coverage for CONCAT provenance, explicit-binary residual preservation, folded native admission rejection, legacy bytewise hash behavior and native invalid-UTF-8 rejection.
  • A temporary mutant that restored the old unconditional CONCAT rank assignment made the authentic conflict regression fail, confirming the test catches the original defect.
  • git diff --check passed.

PASS at documentation head 743903047861c59674ff1582ca0927401141513e:

  • Evidence JSON parses successfully.
  • Historical, candidate and target identity mappings are separated.
  • The documentation describes the current default-closed fence as temporary and does not claim a durable cluster gate.

BVT for #28842 itself is N/A: this PR contains design/evidence documentation; the separate implementation branch has deterministic package-level regressions. Product SQL execution, index backfill and storage-filter behavior remain activation gates and are listed as NOT_RUN.

NOT_RUN / blocked:

  • Complete independent Vitess v0.24.0 versus MySQL 8.0.45 byte freeze, especially the 0900-bin oracle and formal V1 byte-format freeze.
  • Live SQL DML, unique conflicts, original-value return, index backfill, transactions, concurrent conflicts, and actual zonemap/Bloom pruning.
  • Migration conflict/foreign-key/cancel/rollback and restart/backup/restore.
  • Durable catalog activation, mixed-version old-node rejection, and complete remote/cluster admission; production activation remains prohibited.
  • Current-head CI, QA, performance budgets, and full dependency-closure review for the v0.24.0 candidate.

This PR is Ready for design/documentation review. It does not complete or close #28164; production activation and the implementation acceptance gates listed above remain pending.

Synchronization update

  • Current exact head: 7901039b15d4c8295e3d6129eadc646180061244; base and merge-base: main@b347a62a30719cf3f2c8ca5a2da0dcfb11639f8.
  • Rebased from 672da229a99c092f7e896f6fd15b786a3541500f; the 7/7 range-diff remained equivalent, with no semantic code change.
  • Exact-content diff hash: 437b8748fcb7375e9a0a6c568bfeb4b2d0d800465340563f071703f9b177a2de; clean worktree and git diff --check PASS.
  • Fresh CI is pending for the current head. Ready and REVIEW_REQUIRED were preserved; QA and production activation remain separate gates.

@mergify mergify Bot added the kind/documentation Improvements or additions to documentation label Sep 14, 2026
@matrix-meow matrix-meow added the size/XS Denotes a PR that changes [1, 9] lines label Sep 14, 2026
@matrix-meow matrix-meow added size/XL Denotes a PR that changes [1000, 1999] lines and removed size/XS Denotes a PR that changes [1, 9] lines labels Sep 14, 2026
@mergify mergify Bot added the kind/feature label Sep 15, 2026
@VioletQwQ-0
VioletQwQ-0 force-pushed the codex/issue-28164-collation-redesign branch from 672da22 to 7901039 Compare September 15, 2026 08:57
@mergify

mergify Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

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

GPT-6 medium deep review APPROVE at exact head 7901039\n\nDocumentation-only D0 scope reviewed: sidecar removal/replacement proposal, compatibility/lifecycle/liveness/boundedness design obligations, selection report, and evidence. No executable concurrency/resource/platform/test behavior changes or concrete blockers found. Exact-head CI completed successfully. This approves the documentation scope only; it does not authorize the separate implementation branch or production activation.

@mergify

mergify Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-15 22:17 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-15 22:21 UTC · at c2d70599dffcec28cb7a544f63fc2ce41a111216

This pull request spent 4 minutes 1 second in the queue, with no time running CI.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Reason

Pull request #28842 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.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

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

  • Requeue this pull request

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation Improvements or additions to documentation kind/feature kind/test-ci size/XL Denotes a PR that changes [1000, 1999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compatibility]: ODKU ignores case-insensitive and trailing-space unique collations

4 participants