Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Re-reviewed exact head [P2] Supply the consumer measurements required by the new resource gateThe documentation update closes the previous contract-description gap: the versioned supported subset, intentional PRIMARY/UNIQUE rejection, restore/ownership boundaries and per-value resource bounds are now explicit. Maintainer approval is recorded; I am not reopening the approval-absence claim. However, the new acceptance requirement calls for actual The evidence reported in the latest author comment covers semantic tests and a short-input backend key benchmark, not those integration-consumer requirements. I reran Please attach a reproducible exact-head consumer measurement report satisfying the stated matrix, including input/batch sizes, controls and ownership/release observations. If equivalent evidence exists elsewhere, link it explicitly and map it to each row. This does not request bytewise performance parity, a cache, a new state machine, or full Unicode PK support. It is an outstanding acceptance-evidence gap, not a claim that a performance regression or leak has been measured. Fresh correctness verification
Earlier reproduced correctness findings remain closed for the intentionally fenced new-authoring subset. Existing experimental Unicode PK/UNIQUE catalogs, mixed-version deployment, old-binary migration and full local distributed/repository suites were not tested. Latest-head UT/SCA/coverage/distributed BVT were still running when checked; historical green runs are not counted as current-head completion. My earlier scoped correctness approval was conditional on rollout gates and is not evidence that this newly explicit cost matrix has been executed. |
|
Resolved the remaining consumer-cost acceptance gate at exact head 6c0d413.\n\nChanges:\n- Added reproducible consumer benchmarks for sort, grouping/hash window partition, and shuffle.\n- Covered 8/64/1024-byte values with 256/256/64-row batches.\n- Recorded ns/op, B/op, and allocs/op for legacy, binary, and native Unicode controls.\n- Added repeated release checks (16 iterations per control) asserting mp.CurrNB() == 0 after operator/vector release.\n\nThe full matrix, benchmark command, host/toolchain, and methodology are documented in docs/design/issue-29206-uca400-backend.md under “Exact-head consumer report”.\n\nExact-head local verification:\n- Release checks for sort/hash/shuffle: PASS.\n- Consumer benchmark matrix with benchtime=100ms: PASS.\n\nThe report shows Unicode workspace/allocation growth bounded by input bytes and retained rows, while the release assertions show no retained mpool bytes after cleanup. |
|
Re-reviewed exact head [P2] Finish fixture cleanup and limit the release claim to the memory actually observedThe new sort/shuffle release tests allocate a fresh Independent reproduction using the same three controls and 16 repetitions, sorting/freeing vectors and asserting zero on every iteration: The hash benchmark also creates Additionally, UCA key/weight buffers are ordinary Go-heap slices ( Please delete the caller-owned sort/shuffle pools after checking their counters, and reuse explicitly owned process/filesystem fixtures per hash subbenchmark or release them per iteration without accumulating benchmark-level cleanup. Clarify what fixture work is timed. Keep the useful mpool-zero assertions, but either add an appropriate repeated-cycle heap/ownership observation for the claimed Go-heap lifetime or narrow the report to the evidence actually gathered. Regenerate affected measurements after fixing the fixture lifecycle. This is a test/report defect, not proof of a production UCA leak or a newly reproduced SQL failure. Fresh evidence and closed portionsI ran the complete documented benchmark matrix with
|
|
Addressed the P2 release-evidence finding in commit 78a6dcb.\n\nFixture/lifecycle fixes:\n- Sort and shuffle release tests now delete each caller-owned mpool after asserting mp.CurrNB() == 0.\n- Hash release tests now use explicitly owned process/file-service fixtures and delete them per cycle.\n- The hash benchmark creates the process/file-service fixture once outside the timed loop, reuses it across iterations, and cleans it up once after the subbenchmark. The timed region now covers input/operator/hash processing rather than fixture construction and cleanup registration.\n- The updated benchmark matrix was regenerated after this lifecycle change.\n\nScope clarification:\n- The report claims no retained mpool-owned bytes after release.\n- UCA comparison-key/weight scratch is ordinary Go-heap memory, so mp.CurrNB() cannot prove heap retention. The design report now explicitly does not make that stronger claim and calls for a separate heap-lifetime profile before claiming it.\n\nExact-head validation:\n- TestUnicodeCollation(Sort|Hash|Shuffle)ConsumerRelease: PASS (all 16-cycle controls).\n- Consumer benchmark matrix with benchtime=100ms: PASS.\n- git diff --check: PASS.\n\nThe updated matrix and lifecycle methodology are in docs/design/issue-29206-uca400-backend.md under “Exact-head consumer report”. |
|
CI failure resolved by rerunning the failed jobs (run 37881001887, attempt 2).
No source change was needed; this was a transient existing TAE test failure. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of ebd9911c3c1bf65d80de09acbc037c6fe479b053 against merge-base c2c1031d0ba4b1034849f6bd3d267252a11eb6c9: REQUEST_CHANGES.
P1 — newly admitted Unicode types lose their revision in composed string expressions. The native identity now requires revision V1, but existing common string type derivation still assigns only Charset. On the exact head, a real single-CN SQL integration probe creates (id INT PRIMARY KEY, s VARCHAR(64) COLLATE utf8mb4_unicode_ci) with (1,'A'),(2,'a'). Each of these predicates fails with 20105: not supported: unknown collation identity/revision 10/0:
WHERE coalesce(s,'x')='a'
WHERE coalesce('x',s)='a'
WHERE case when id=1 then 'a' else s end='a'
WHERE if(id=1,s,'a')='a'
WHERE least(s,'z')='a'
WHERE greatest(s,'0')='a'The adjacent lower(s)='a' and concat(s,'')='a' controls both return 2. This reproduced in two fresh native runs. commonConditionalStringType updates Charset without CollationVersion; LEAST/GREATEST's width promotion and merged string type similarly rebuild a legacy type and copy only Charset. Complete type derivation must preserve the identity/revision contract together, including the other Charset-only result builders, using the existing type owner. Add real expression-composition regression coverage, including NULL and mixed-width branches; the current consumer integration test only checks LOWER among composed expressions.
Historical comments: the PK restriction/reader admission, IN/NOT IN, invalid-byte separation and mb3 rejection, generic SERIAL round-trip, and sort/window fixes are present. The existing TestUnicodeCollationConsumerContract passed locally at this head (8.50s). All five inline threads remain marked unresolved on GitHub; that UI state is distinct from the verified code fixes. The earlier supported-subset and allocation-cost design requests have substantive answers in the revised document; I am not reopening the approval-paperwork objection.
Design/engineering review covered all 82 changed files and the existing producer/consumer owners. Increment: implementation +1124/-118 (52 files), tests/benchmarks/fixtures +1209/-14 (29), documentation +191/-15 (1). The key/comparison owner and explicit admission guards are preferable to another state machine. The bounded benchmark fixtures and real SQL integration add useful evidence, but miss the type-composition boundary above. A suspected CREATE INDEX/DML key mismatch did not reproduce in either literal or INSERT SELECT public probes: early/late index creation produced the same persisted key and deletion removed both base/index rows; it is not filed as a finding.
Performance: native UCA is materially more expensive than byte comparison. The documented sort cases show roughly 59x at 8-byte/256-row and 230x at 64-byte/256-row with substantial Go allocations; sort recomputes keys per comparison. Hash/shuffle also allocate. The document now exposes these limits and does not claim TP throughput parity; these microbenchmarks do not establish TP or prepared-statement regression numbers. No new evidence justifies replacing the recorded native-cost tradeoff with another approval gate.
Validation: exact-head CI run 37900232172 is successful; local native CGo prerequisites were rebuilt in the isolated worktree. The existing public consumer test passed, while the review-only adjacent-contract probe failed as detailed above. No production changes were made.
|
Updated the branch with commit Addressed the P1 by making common string type reconstruction preserve the collation identity and revision together:
Validation passed:
|
|
Re-reviewed exact latest head Closed findings
Fresh exact-head evidence
Scope/limits: this is incremental re-review of the repaired boundaries, not a new exhaustive review of unrelated merged main changes. Native Unicode PRIMARY/UNIQUE support and migration of existing experimental catalogs remain excluded. Full repository/distributed suites, mixed-version rollout, live checkpoint restore and a Go-heap retention profile were not run locally. Latest-head CI is still pending when checked; prior green runs are not treated as current-head completion. The documented semantic/cost contract and supported-subset boundaries remain the landing scope. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
APPROVE at 7e7c423, merge-base c2c1031. No remaining blocking finding confirmed in the admitted native-Unicode subset.
Reviewed all 90 changed files, including the full implementation, tests and design, and the final delta from my ebd9911 review. The previous composition failure is closed at the shared type owners: CASE/IF/COALESCE, LEAST/GREATEST, aggregate/string return construction and pure-CHAR set operations preserve the selected collation revision. Mixed-width and typed-NULL cases have actual SQL result oracles, not only metadata-helper assertions.
Historical closure: new Unicode PK/UNIQUE definitions and conversions are rejected until storage uniqueness semantics support them; unsafe existing raw-key pruning fails open; IN/NOT IN share the comparison domain; valid UCA keys and invalid-byte fallback cannot alias; typed writes reject invalid UTF-8/mb3 supplementary values; generic SERIAL remains lossless while physical key serialization is explicit; full ORDER BY, TopK and window peers use the semantic comparison type. Physical index bytes cannot escape through covering/index-only paths, and nonunique-index fallback retains the source predicate. These close the earlier inline findings in code; this does not assert that every GitHub thread's UI resolved flag was toggled.
Design/ownership: the existing collation/type, comparison, keycodec, vector, planner and operator owners carry the behavior. No additional cache, background worker or lifecycle controller is introduced. I traced the adjacent persisted-scan concern through table-scan vectors constructed from plan types and block materialization into those destination vectors, then their grouping/shuffle consumers; the read path does not require a second persistent collation store. Unsafe physical shortcuts remain conservatively disabled. Unsupported pre-existing experimental Unicode PK/UK catalogs and mixed-version rollout remain outside the admitted deployment contract.
Evidence reused, with source/oracle inspection: exact-head focused type/function/aggregate/planner tests, the public TestUnicodeCollationConsumerContract, independent SQL composition/DDL/index/cluster-key probes and release/benchmark matrix documented in issuecomment-6078625392; CI Required is now successful in run 37914136069, including the formerly pending checks. git diff --check passed locally. This pass did not rerun the same test/benchmark matrix.
Performance acceptance is explicit, not a zero-cost claim: native UCA comparison/key generation has substantial CPU/allocation cost, including per-comparison sort keys and hash sizing plus encoding. The recorded consumer measurements and lifetime scope address the prior cost-report finding; ordinary legacy/binary paths retain their fast-path controls. No TP throughput or Go-heap-retention benchmark is claimed. The recorded design tradeoff is accepted without reopening it absent a new failure.
Increment assessed separately: implementation 56 files +1157/-134; tests/fixtures 33 files +1330/-14; design 1 file +191/-15. The regression set covers distinct consumers, invalid inputs, physical/semantic representation boundaries, release/reuse and public SQL behavior. No further mandatory validation gap or concretely reachable correctness/resource failure remains from this review.
aptend
left a comment
There was a problem hiding this comment.
Deep re-review of exact head 7e7c423fd7e2d7d9679be17e1ddf3b9bddb674a8 against declared base/merge-base c2c1031d0ba4b1034849f6bd3d267252a11eb6c9: REQUEST_CHANGES for one reproduced legacy CHAR ordering regression, detailed inline.
Reviewed all 90 changed files/hunks, the complete previous reviews, inline discussions, author replies and thread resolution state, plus the latest composed-string revision propagation delta. The design/cost report and explicitly fenced native-PK/UK subset were considered; I am not reopening those accepted scope/cost decisions.
Change/closure map:
- Metadata, DDL/protocol and string-result construction: checked executable identity/revision propagation through casts, conditional expressions and least/greatest.
- Equality/hash/shuffle and aggregate consumers: checked canonical-key equivalence, NULL handling, tagged invalid-input fallback and typed-write admission.
- SQL full sort, TopN/merge and window peers: checked comparison/peer relation agreement; this exposes the blocking non-Unicode CHAR counterexample.
- Physical index writes/probes and reader optimizations: checked separate physical-key versus lossless generic SERIAL contracts, native PK/UK rejection, non-covering fallback and unsafe raw-pruning guards.
- Tests/design: checked consumer fixtures, release/cost evidence, public SQL coverage and platform evidence.
Unhappy-path audit (changed closures):
| Question | Closure/evidence |
|---|---|
| Q1: ownership/cleanup | Temporary keys are Go-heap values; retained keys/vectors belong to the existing map/operator owners. Checked copied keys and reset/free paths plus release fixtures. No stronger Go-heap-retention claim is inferred from mpool release checks. |
| Q2: termination/waits | No new worker, RPC, channel wait or cancellation protocol is introduced by these key/metadata/comparison changes. |
| Q3: growth | Checked the documented linear per-value key/scratch bounds and existing retained-state ownership; accepted Unicode allocation/CPU costs are recorded in the design, not assumed to match the bytewise fast path. |
Validation:
- Reused exact-head CI run 37914136069: required gate, Ubuntu UT, arm64 SCA, coverage/shared build, and enabled Compose PESSIMISTIC/PROXY BVT succeeded. Skipped upgrade/other jobs are not claimed as passing.
- Locally executed
TestUnicodeCollationConsumerContract: PASS (8.40s). - Added an isolated public-MySQL SQL counterexample,
TestReview29601LegacyCharOrderPrefix. On this head it repeatedly FAILS: full order[2,1,3], LIMIT 1[1]. The identical test on the exact declared base PASSES: full order[2,1,3], LIMIT 1[2](9.42s). Thus this is a demonstrated PR regression, not an inferred concern. - Both revisions were tested in detached temporary worktrees with the repository CGo/native-artifact guard;
git diff --checkpassed. The main workspace was not modified.
Please make the SQL comparison and peer-partition relations consistent for legacy CHAR too (without changing persisted physical-order contracts), and add this public SQL regression case.
|
Updated PR #29601 at head Changes:
Validation on the merged head:
|
|
Re-reviewed exact latest head The previously reported full-sort/TopN inconsistency is closed. Independent real-MySQL-client reproduction on a fresh one-CN embedded cluster built from this head: CREATE TABLE chars(id INT PRIMARY KEY,s CHAR(4) COLLATE utf8mb4_bin);
INSERT INTO chars VALUES(1,'a '),(2,'a'),(3,'b');Verified results:
The merged function IDs also remain consistent: main's Fresh validation:
Earlier supported-subset, composed-type and fixture/cost-report closures remain intact. I did not rerun the unchanged benchmark matrix in this pass; the prior independently reproduced measurements and explicitly limited mpool-only release claims remain the relevant evidence. Native Unicode PRIMARY/UNIQUE support, migration of experimental catalogs, mixed-version rollout, full local repository/distributed suites, and Go-heap lifetime profiling remain outside the evidence claimed here. Latest-head required CI is still running; historical green runs are not counted as current completion. |
aptend
left a comment
There was a problem hiding this comment.
Re-review of exact head 9f1cd0a4a66b0323a453cb7d176f43a6fda8764e against declared base/merge-base 0ccc989731f9c2b40d31554a44ca505c656c0e62: APPROVE for code review. My previous legacy-CHAR ordering blocker is fixed, and no new blocking finding was confirmed. Merge/release remains subject to the repository's required latest-head CI; this approval does not declare pending CI passed.
Scope/history:
- Read the complete review/comment/thread history, including the new author replies and all seven inline threads. GitHub's unresolved/outdated flags were considered separately from actual code closure.
- Carried forward the complete 90-file change map from my
7e7c423fd7deep review, compared the current full PR diff against its new base, read all six changed patch blocks, and checked relevant main-merge interactions. The other 84 file patches retain the reviewed changes. - The accepted supported-subset/cost design document is unchanged. Native Unicode PK/UNIQUE authoring, experimental-catalog migration and mixed-version rollout remain outside the supported scope.
Verified repair:
strComparenow usesCompareStringOrderValues: ordinary CHAR retains the same raw-byte ordering as full sort and peer partitioning; native Unicode delegates to the existing tagged UCA relation.- Scalar CHAR comparison still ignores trailing spaces. This restores base compatibility across sorting operators; it is not a claim that every legacy CHAR/MySQL ordering behavior is standardized by this PR.
- Function-ID merge closure preserves main's
UUID_SHORT=587, assigns physical serializers/key functions 588–590, and sets the sentinel to 591. Constants, name registration, overload registration and fixed-ID tests agree. - Rechecked the unchanged historical admission, IN/NOT IN, tagged-invalid-input, mb3-write, composed-revision, lossless SERIAL/physical-key separation, sort/window and conservative reader/index fallback closures.
Fresh local validation at this head, Linux/amd64, Go 1.27.1, normal CGo mode:
- Rebuilt native prerequisites only in the detached temporary worktree with top-level
make -j2 cgo; the guarded wrapper correctly refused stale primary-worktree artifact reuse. - Updated
TestUnicodeCollationConsumerContractPASS (8.359s), including the committed original counterexample. A review-only extension also passed: ascending full IDs[2,1,3], LIMIT 1[2], LIMIT 2[2,1], OFFSET 1/LIMIT 1[1]; descending full IDs[3,1,2], LIMIT 2[3,1]; scalars='a'still matches 2 rows. Those temporary assertions were removed after validation. - Nine named focused tests PASS across types, compare, function, sort, hash-partition and shuffle: key/order semantics, plan-type ownership, fixed IDs, physical/generic serialization, and all three Unicode consumer-release checks. Release checks were rerun because the merged base changed mpool accounting.
- Reused the exact-head author package/planner and adjacent public-SQL evidence within its stated scope after source/oracle inspection; did not rerun the unchanged benchmark matrix or claim TP throughput/Go-heap retention evidence.
- Current PR and temporary-test diffs pass whitespace/format checks; the main workspace was not modified.
Incremental unhappy-path check:
| Q | Closure |
|---|---|
| Q1 ownership | No new key/vector owner is introduced by the comparator split. Sort/hash/shuffle release checks pass under the merged allocator; this does not prove general Go-heap non-retention. |
| Q2 termination | The repair adds no worker, wait or cancellation protocol. Existing operator terminal paths are unchanged. |
| Q3 boundedness | Legacy ordering remains allocation-free byte comparison; Unicode delegates to the reviewed per-value key bounds and existing retained-state owners. |
Latest-head CI run 38019062185 is still running at review time (Ubuntu UT, arm64 SCA and enabled Compose BVT). Historical green CI is not substituted for current completion; required branch-protection/release gates must finish successfully before merge.
aunjgr
left a comment
There was a problem hiding this comment.
APPROVE the documented fenced native-UCA400 subset at 9f1cd0a against declared base 0ccc989. This head is unchanged from my immediately preceding review; required CI is now green.
The implementation direction is appropriate: carry collation identity and revision together, retain generic SERIAL's lossless value contract, and use explicit physical/equality comparison keys. Native Unicode PRIMARY/UNIQUE authoring is rejected until storage dedup/locking can honor that relation. Raw-byte index/probe shortcuts and opaque-key covering projections are conservatively disabled rather than allowed to discard equivalent rows or expose weight bytes as text. Typed invalid/repertoire checks and tagged comparison fallbacks remain separate owners. The latest legacy CHAR repair preserves bytewise SQL ordering consistently with full sort/TopN while leaving scalar trailing-space equality unchanged.
Independent exact-head Linux probe executed the actual types comparison/key/admission helpers. Straße/STRASSE, é/e, A/a and trailing-space cases compare equal and produce equal canonical keys; b/a remains ordered distinctly. utf8mb4 accepts a supplementary character, utf8mb3 rejects it, invalid UTF-8 is rejected, and legacy CHAR retains equality=0 but order=1 for a-space versus a. Read the approved design, core metadata/consumer/index/DML boundaries and regression oracles; no confirmed blocker in those reviewed contracts. Diff whitespace checks pass.
Evidence reuse/limits: the author reports exact-head owning tests and public-session checks across composed expressions, PRIMARY/UNIQUE rejection, non-unique index DML and composite CLUSTER BY predicates before/after flush. The documented consumer measurement/release report supplies the declared bounded-scaling evidence and limits zero retention to mpool-owned bytes. Those SQL/package/benchmark runs were not independently repeated locally; the probe above is my own execution, not a live SQL or restore run. Current required CI, UT/SCA/coverage and proxy/pessimistic BVT are successful. This is not exhaustive certification of every historical collation path or fresh full implementation/restore validation.
Operational caveat: UCA sorting/hashing has substantial allocation and CPU cost compared with byte comparison. The approved contract accepts bounded scaling, not performance parity; Go-heap scratch lifetime is not proved by mpool release counters. Approval does not enable native PRIMARY/UNIQUE keys, migrate experimental catalogs, or establish mixed-version/old-binary rollout or live checkpoint restore support beyond the documented subset.
Merge Queue Status
This pull request spent 17 minutes 44 seconds in the queue, with no time running CI. ReasonPull request #29601 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.
HintYou 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. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #29206
What this PR does / why we need it:
This is the first executable integration stage for native Unicode case-insensitive collations.
utf8_unicode_ci(utf8mb3) andutf8mb4_unicode_citype identities instead of mapping them togeneral_ci.This does not claim the complete #29206 rollout. UCA0900, durable relation/index key-format migration markers, mixed-version admission, old-table rebuild/recovery, persisted-filter migration, and full distributed BVT coverage remain follow-up work.
How has this been tested?
go test ./pkg/common/collationgo test ./pkg/container/typesCGO_CFLAGS="-I./cgo -I./thirdparties/install/include" CGO_LDFLAGS="-L./cgo -L./thirdparties/install/lib" go test ./pkg/sql/plan/function ./pkg/sql/plan -count=1go test ./pkg/tests/sqlintegration -run '^TestUnicodeCollationConsumerContract$' -count=1 -vgofmtandgit diff --checkThe latest reviewer findings are addressed as follows:
CollationVersionon both rebuilt operands, including derived-expression comparisons such asLOWER(s) = 'a'.The integration regression covers single/composite primary-key admission rejection, UNIQUE admission/conversion rejection with a legacy control, derived comparison, equality/IN/NOT IN, full and limited ORDER BY, window peers/partitions, GROUP BY, lossless generic SERIAL, and utf8mb3/invalid UTF-8 admission.