Skip to content

feat: add frozen collation weight backend for #28164 - #29054

Merged
XuPeng-SH merged 10 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/28164-pr1-foundation
Sep 20, 2026
Merged

XuPeng-SH merged 10 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/28164-pr1-foundation

Conversation

@VioletQwQ-0

@VioletQwQ-0 VioletQwQ-0 commented Sep 17, 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:

PR1 is the foundation of the staged #28164 implementation. It adds the fixed Vitess v0.24.0 weight adapter and freezes the candidate V1 key payload for the supported text semantics, while preserving the existing tuple framing and legacy behavior.

Changes:

  • pin Vitess v0.24.0 and its required module dependency closure;
  • provide general-ci, utf8mb4_bin, utf8mb4_0900_ai_ci and utf8mb4_0900_bin weight paths;
  • validate UTF-8, bounded output, malformed payloads, ownership and binary fast paths;
  • record the independent MySQL oracle, golden bytes and tuple evidence;
  • keep production admission disabled and make no SQL/index activation change in this PR.

Dependency order:

  1. This is the first implementation PR and is based on the [Compatibility]: ODKU ignores case-insensitive and trailing-space unique collations #28164 design in docs: revert sidecar design and propose collation key reuse #28842.
  2. PR test: cover canonical collation admission and legacy SQL behavior #29055 (codex/28164-pr2-metadata-tuple, d21a9b5e94) depends on this PR.
  3. PR fix(plan): validate catalog collation metadata before pruning #29056 (codex/28164-pr3-sql-semantics, 0f06a4339e) depends on PR1 and PR2.
  4. PR fix(sql): isolate binary capacity and assignment semantics #29057 (codex/28164-pr4-index-readwrite, 2de15a3e98) depends on PR1–PR3.

The branch was extracted from stack baseline 3a50d04378. Before this update it was synchronized with the current GitHub target main at 780ef933f2 via a merge; the PR diff remains scoped to the foundation changes.

Validation:

  • Independent PR1 go list, go build, go vet and package tests for ./pkg/common/collation and ./pkg/container/types: PASS.
  • MySQL 8.0.45 comparison and frozen-byte evidence: PASS for the codec scope.
  • Full SQL, index, persisted-filter, migration, mixed-version and production-activation validation: NOT_RUN.
  • BVT: N/A for this foundation layer because native semantics remain rejected by default and no production SQL path is admitted here. Consumer and integrated DML PRs must provide the runtime SQL evidence.

QA required: yes. QA must validate the complete #28164 chain, including SQL semantics, DML/index behavior, persisted filtering, migration/recovery and compatibility gates. This PR alone is not production-ready; it is Ready for review while production activation remains disabled.

Review and repair status (prior repairs are from the first-parent history; current update is exact head 013b9514ec57d7ed71054be8f46aa6e2d7c8d33b):

  • Fixed the confirmed SCA blocker by replacing the four production errors.New sentinels in pkg/common/collation/key.go with repository moerr sentinels; make err-check passes.
  • Made the AWS SDK v2 dependency upgrade explicit and compatible: NewAwsSDKv2 selects RequestChecksumCalculationWhenRequired and ResponseChecksumValidationWhenRequired, with a constructor regression test.
  • Fixed multi-object delete compatibility: when an endpoint rejects the new SDK checksum with MissingContentMD5, InvalidDigest, BadDigest or InvalidRequest, MatrixOne disables batch deletion and falls back to individual DeleteObject calls. The HTTP regression verifies the first batch rejection, all single deletes, and subsequent batch disablement.
  • Narrowed the fallback comment so it does not claim general batch atomicity.
  • Reclassified tuple/decoder and Packer results in the design evidence as historical integration evidence; PR2 must re-run them against its own source. Current source hashes include the AWS deletion path and tests; historical commands, hashes and raw logs are grouped separately.
  • Local validation: current collation package list/build/vet/tests, make err-check, focused fileservice tests including the checksum-rejection fallback, JSON validation and base-to-head diff check: PASS. Race/fuzz/benchmark reruns are explicitly marked NOT_RUN or BLOCKED_ENVIRONMENT.
  • Exact-head remote CI is re-running after this fix; full SQL/index, persisted filtering, migration, mixed-version and QA validation remain NOT_RUN for PR1.

Current PR1 LIKE boundary (exact head 013b9514ec57d7ed71054be8f46aa6e2d7c8d33b):

  • Removed the unvalidated UCA0900AIMatch export and its direct Vitess Wildcard call. No PR1 Go caller or matcher definition remains.
  • Weight generation, collation comparison adapters, V1 payload bytes and existing golden fixtures are unchanged. The evidence source hash for pkg/common/collation/uca0900.go is updated to this source.
  • LIKE is explicitly NOT_RUN in the evidence and belongs to PR3. PR3 must implement character-space %, _ and escape semantics and add the MySQL oracle matrix; weight equality/order is not LIKE evidence.
  • A temporary fixed-Vitess probe observed ss/ß and reverse as true, and 31 repeated %a as true while 32/33 returned false. This is exploratory API-risk evidence only, not a PR1 or MySQL oracle PASS.
  • Post-update local validation: collation go list, go build, go vet, go test -count=1, make err-check, JSON/source-hash checks, helper-reference search and git diff --check: PASS.

The PR is Ready for review. It remains a foundation PR and is not production-ready.

@matrix-meow matrix-meow added the size/XL Denotes a PR that changes [1000, 1999] lines label Sep 17, 2026
@VioletQwQ-0
VioletQwQ-0 marked this pull request as ready for review September 17, 2026 09:46
@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 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.

APPROVE — reviewed exact head 5a2e738. Frozen collation weight provenance, PAD SPACE/Unicode handling, bounds, ownership and fixture validation are consistent; no actionable P0–P2 findings. Exact-head CI passed collation/fileservice race tests, build, SCA and active BVT. This foundation PR does not yet wire the codec into production comparison/index/LIKE/fulltext or persistence paths; those remain follow-up integration work.

@mergify

mergify Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-20 07:38 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-20 08:23 UTC · at 0cdc290754a1865577021faecce7f94f3faf1d39

This pull request spent 44 minutes 42 seconds 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 #29054 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/enhancement kind/feature size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants