Repository navigation
feat: extend metadata-only ADD to restricted BOOLEAN DEFAULT false - #30958
Closed
VioletQwQ-0 wants to merge 55 commits into
Closed
VioletQwQ-0 wants to merge 55 commits into
VioletQwQ-0 wants to merge 55 commits into
Conversation
(cherry picked from commit 55f3dec)
1 of 7 tasks
6 of 13 tasks
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30518; this restricted optimization does not close the investigation tracker.
Depends on #30816. Its exact
a44bc4b37cc221938dd29da63cf965185c75ab5chead (including partition safety repairc547c949bc) and pinned main2465dae7a4ada1b277113cca5afff6fe10149b96are integrated without rewriting the measured history. The main-based diff still contains the unmerged prerequisite. Its outstanding public design review and merge/deployment gates remain separate; keepdo-not-merge/wipuntil those are resolved. This PR remains Draft while the new integrated-head CI and the open prerequisite design boundary are reconciled; Ready will mean ready for formal review, not permission to merge or enable in production.What this PR does / why we need it:
data_cleaning adds a nullable
BOOLEAN DEFAULT falsebefore UPDATE/DELETE. Persist an immutable old-row missing-column value separately from the current INSERT default so an eligible ADD can avoid COPY without changing historical reads.Supported scope and ownership
mo_m0plus guarded, isolated, same-executable LOG/TN/CN admission. Only independent pessimistic RC autocommit, one trailing nullable BOOLEAN literal false, and the existing M0 table/layout restrictions qualify. Ordinary builds retain COPY behavior.SchemaExtra/mo_tables.extra_infoowns durable history. Projections, captured writes, clone, logtail and recovery carry the identity. Existing physical values and NULLs win; only a proved complete old physical prefix may receive typed suffix values.metadata_scanand column min/max use the same proved immutable fill rule. Aggregate zone maps own their bytes. Mixed old false suffixes and physical true/NULL are checked before COPY exit, with relation/version identity assertions.No additional default types/expressions, transaction expansion, scheduling/merge policy, cache or optimization mechanism is included.
Design, compatibility and review
Versioned design R2 (SHA256
2a2f7cd2604ebc4df226a08893dbc329bc6e9d3d80d0fa78f1a8a8eb0612c443) has a distinct independent design decision, followed by an independent no-context implementation review/repair loop. Two public metadata findings and the mixed-object coverage follow-up were closed. Model review does not dismiss #30816's public review or replace maintainer approval.Durable schema/protobuf metadata changes are intentional. Unknown-field tolerance does not make old binaries safe. The cooperative launcher, inode xattrs and inherited lock require an exclusive owner; they cannot stop arbitrary old executables. Mixed versions, rolling upgrade, downgrade, arbitrary recovery tools and production enablement remain unqualified. Keep the feature disabled if isolation cannot be enforced. See
tools/data_cleaning_birth/DESIGN.md,DESIGN_REVIEW.md,README.mdandSTATUS.md.Prior integration validation (historical 1497acd)
Prior integrated head:
1497acd95502a19f12fa622d9f7bc6113c1e4b3a(metadata repair109332183a97a3f89bcf9328bac9efd376364a6c;9c18153294removes a redundant post-nil-guard check and consumes three negative SQL probes without allocating Rows;5ef8889cbdonly preallocates a regression input slice, with its length, values and assertions unchanged).moerradmission errors, no unnecessary targetCopyTableDefcall on ordinary COPY, and nil-safe catalog extra projection.9c18153294, tagged SQL qualification passed 15 root tests, including the new public metadata subtest, clone/merge, cancellation/rollback, same-binary restart/checkpoint, ordinal/View controls and ordinary COPY.-race -count=3passed five roots across four packages (15 root executions), including the real SQL metadata/recovery path. The later exact-head CI/BVT and distinct Linux ordinary/tagged receipts are recorded below. No current-head pass is inferred from old binaries. Ordinary CI alone does not qualifymo_m0. The ordinary plan-package static check and transition regression also pass after the final capacity-only repair.9c18153294passed ordinary UT, Shared Build and PROXY BVT. Its ordinary SCA found the plan-test capacity issue now repaired; coverage failed when cross-package admission waits consumed the embed package deadline. The existing bounded-pool correction is tracked independently in CI #468; its canary success does not turn this PR's failed producer green. Subsequent run 40273113993 at5ef8889cbdpassed ordinary UT, SCA, UT Coverage and both BVT groups; its aggregate changed-code coverage failed at 480/835 (57.49%). CI fix format print #468 is merged; that earlier producer timeout is not the remaining coverage failure. The prior9c18153294PROXY group excluded DDL. At5ef8889cbd, actual PROXY selection executed customer 73/73 and algorithm/lock 30 passed / 5 ignored / 0 failed; this is ordinary BVT, not guardedmo_m0qualification.test/distributed/cases/ddl/m0_customer_add_clone.sql/.result, alongside the existing fallback/algorithm case. Local official mo-tester execution is not claimed; actual CI case selection must be read back.Dependency and coverage closure (1497acd)
25d1e5b76dintegrates prerequisitea329de964e: legacy proof requires actual catalog database/table IDs and canonical column seqnum/type, rather than a table name alone. The owning tables package passes 23 roots plus the new typed-fill consumer test.5ef8889cbdremain superseded; no new SF100 was started.Linux qualification (1497acd, 2026-10-27)
mo_m0roots (TestM0BirthFalseSQL, fallback, transaction fallback and public ordinals), ordinaryTestPublicOrdinalsStoredSystemViewSQL, and unadmitted taggedTestM0DefaultFalseCopySQL. This covers the stored false/content oracle, ADD object non-rewrite, clone/merge, same-binary restart/checkpoint, COPY exit, fallback and ordinal boundaries. The ordinary root covers explicit COPY/ordinal behavior; ordinary DEFAULT false SQL is additionally covered by exact-head ordinary CI BVT. Tagged unadmitted control is not called an ordinary binary.Main/dependency conflict closure (e79a108, 2026-10-27)
e79a108cc3be230a3a1bcfee3c18b2a256501eca. Normal merge8c2b82a775integrates pinned main2465dae7a4; mergec378c67ec2integrates prerequisitea44bc4b37cand its partition-admission repair. Commite79a108cc3adds regression coverage and restores the import required by the incoming test. Existing history is preserved.do-not-merge/wip; no Ready, merge or production approval is claimed here.Sealed measured evidence (D3/C3, not this integrated binary)
COPY control D3:
64aa85d35f926136bdb249ece3839307fedef1ca.Measured candidate C3:
0343d680a7bce6763e6aea4c513601212bf95f3a.The formal local screen completed twelve valid arms: three alternating pairs per cleaned 2.94M-row UPDATE/DELETE fixture. Original-chain median speedups were 3.626x / 3.631x; content, mechanism, read, continuation, cumulative CPU/write and cleanup gates passed. The invalid first DELETE pair is retained and excluded as a whole; its one permitted environment rerun is recorded. Those fixtures have zero DML matches; separate 60K-row actual UPDATE/DELETE checks showed 1.71x / 2.08x chain speedups and about 27–29% lower cumulative CPU.
One full SF100 data_cleaning pair, 10 workers x 20 steps, completed:
Each round completed all 200 steps, zero unexpected SQL errors, evaluation checks and bounded sanity. Actual operation graphs, inherited widths and cross-read counts differ, limiting causal attribution. Setup, driver, fixed 60-second observation, DROP and shutdown are reported separately. LocalFS successful-call bytes are not object payload, WAL or device I/O; fixed windows are not natural drain. Full every-branch contents, long-term debt, statistical significance, stable speedup and recovery of the paper's 58.6 seconds are not claimed.
These are frozen historical performance receipts, not measurements of the integrated head. No new SF100 run was started merely to obtain Ready status; a future relevant execution-path change must receive proportional revalidation rather than relabelling C3 evidence.
Remaining acceptance gates
e79a108cc3; local affected validation passes. Required CI and actual BVT selection must now complete on this new head before Ready is reconsidered. The older Linux qualification remains explicitly bound to 1497, with integrated shared-path changes covered by the current local controls and pending new CI.