Repository navigation
Description
Parent Issue
Parent issue: #32278
Detail of Subtask
Catalog ID: D21
Origin: A - Introduced by 4.2-to-main evolution or incomplete retirement on main
Evidence level: Added operational burden confirmed in source/documentation; workflow optimization
4.2 versus main: provenance
Main adds legacy-CDC migration rejection, ambiguous snapshot-ownership decisions, and a 4.2-to-main upgrade guide absent from the baseline workflow. Coordinate with #31490's catalog migration work; this subtask focuses on operator steps and intermediate state.
Design problem, impact, and existing responsibility
Paused/failed legacy CDC tasks also block upgrade, requiring export/deletion of tasks and watermarks before upgrade and reconstruction afterward. Some snapshot decisions require exact UUIDs/NDJSON on shared storage. Refusing to guess identity is necessary, but discovering requirements only at startup and making users assemble internal state increases recovery cost and failure opportunities.
Acceptance criteria
- Pre-upgrade checks identify affected tasks/snapshots and accurate actions; necessary decisions support bulk export/validation and idempotent execution.
- Validate supported stopped upgrades, old-backup restore, interrupted migration/retry, and large catalogs; avoid discovering impossible requirements only after partial mutation.
- Provide the shortest executable operator steps, cost, and recovery boundaries. Remove superseded intermediate stages/compatibility branches without requiring users to understand internal state machines.
Describe implementation you've considered
Reuse existing upgrade/restore ownership to move non-mutating checks, bulk export/validation, necessary decisions, and resumable progress before disruptive steps. Evaluate verifiable migration or explicit reinitialization. Preserve clear rejection where identity cannot be established, without adding another permanent repair workflow.
Additional information
Existing investigation and validation limits
service_upgrade_cdc.go, service_upgrade_snapshot.go, and the upgrade-4.2-to-main guide are additions relative to the baseline. No claim is made that every old CDC definition can migrate losslessly or that necessary human decisions should be replaced by guessed metadata.
main investigation snapshot: pkg/bootstrap/service_upgrade_cdc.go:29; pkg/bootstrap/service_upgrade_snapshot.go:189; docs/guides/upgrade-4.2-to-main.md:1
4.2 baseline snapshot: pkg/bootstrap/service_upgrade.go
The named probes are local diagnostic overlays, not committed repository tests. Their names identify the investigation; they cannot be selected directly from an ordinary checkout. Implement the smallest maintained contract regressions and reuse relevant CI/validation proportionally. Temporary evidence commits are not required.
Related existing work: #31490, #27967. Closed items identify implemented controls or historical context; they do not mean this subtask is already resolved.
Activity
[-][Subtask]: D21 [4.2→main] 简化 4.2→main 升级的人工中间过程,提供前置预检与可恢复迁移[/-][+][Subtask]: D21 [4.2-to-main] Simplify operator steps for 4.2-to-main upgrades with preflight and resumable migration[/+]MatrixAdventurer commentedon Nov 6, 2026
分级建议:severity/s-1——父单 #32278 的升级运维负担类子任务,正文未见数据错误或集群故障证据,属可排期优化。
所属模块:4.2→main 升级链路(升级运维步骤/预检)。
疑似重复:未发现;同链路已知故障 #27967(open/s0)、#29396(closed)仅作参考。
建议负责人:XuPeng-SH(父单发起人、本子任务 assignee)。
本操作由LW授权的MOI智能体提交
fix: consolidate stopped-upgrade cleanup and stabilize CI (#32307)
XuPeng-SH commentedon Nov 6, 2026
QA handoff for #32307, merged into main as
606ae4fb2a94890709a2d573aaee936a27442dc3on 2026-11-06. This is a product upgrade subtask; it remains open for QA rather than being closed as CI flaky. This handoff is not acceptance.Delivered scope
A read-only 4.2 preflight inventories CDC tasks and ambiguous snapshot ownership before upgrade. It reuses the existing decision export/validation/publication path, requires explicit administrator decisions and exact-preimage checks, and preserves rejection where safe CDC resumption or identity cannot be established. Signal cancellation joins the tracked direct child, including launch-to-PID-registration; an atomic publication that wins remains a complete file. Snapshot catalog reads use pages of 32 for legal wide names within the 4 MiB result cap; decision-write/diagnostic batches remain 128.
The complete issue history contains one triage comment, with no further implementation request. Returned PR discussion reports no current counterexample or unfinished explicit follow-up for the delivered subtask. Parent #32278 and separate #29433 are not completed by this handoff.
Evidence and limits
Validation reported by the author is separate from this handoff. After rebasing on
bfbb2645c034, the author reports bootstrap/sysview race runs (84/43 top-level tests), focused stale/missing/failed PARTITIONS and admission checks, a real-catalog predecessor-definition reconciliation, and a rebuilt released-4.2.5 single-CN/two-tenant stopped upgrade plus clean restart. Earlier broader suites, 4.2.8 upgrade/snapshot results and 4,382-pass BVT evidence are historical, not fresh final-head reruns. Review 5807211198 coversdf8de7376c21435679b4d1e6fc87e11726ef1e7aand reports 11 exporter tests/static audits while reusing author runtime reports; it did not independently run Go, cluster-upgrade or BVT, and raw author logs were unavailable. Final recorded PR head iscc890a2341a99791a2034bd26a5f562d3969936d; five CI jobs were incomplete at that review. No new final-head runtime or CI pass is claimed here.Earlier author reports include 11 preflight tests, deterministic cancellation and 20 signal repetitions, released-4.2.8 historical-snapshot/129-wide-snapshot upgrade/recovery/restart, plus Bash/ShellCheck/Ruff checks. These are not this handoff's executions or fresh final-head passes. No tests were run here; the headerless patch does not provide an independently enumerated 66-file audit.
QA boundaries
Exercise inventory/export/validation, explicit decisions and preimage mismatch, interrupted/retried publication, cancellation before/after child registration and publication, wide snapshot names, and stopped upgrade/restart with retained data. Confirm invalid CDC restore requirements reject before mutation. System-account and cluster snapshot/PITR restores with incompatible old CDC watermark schema remain deliberately rejected, not losslessly migrated. Preflight needs a MySQL-compatible client, jq, GNU coreutils, proportional scratch disk, and drained source snapshot/branch writers. Smaller pages can cause roughly four times as many one-time page reads and do not bound total engine memory. Real release multi-CN, production-scale resource cost, mixed-version and downgrade behavior are not validated/supported by this change.
Handing to @Ariznawlll for scoped QA.
Ariznawlll commentedon Nov 10, 2026
结论
测试通过。
关键证据
00da05219fb8dce0266de4efa7c4bbfac06491de,使用官方 4.2.5 发布包,在隔离 Linux 环境执行停机升级。旧版创建真实运行中的 CDC 任务后,预检识别出 1 个任务;main 启动时拒绝升级并提示任务名与状态。恢复升级前的 4.2.5 数据副本后,确认原任务仍存在。真实 CDC 验证user后升级、重启以及从旧备份恢复再升级均保留用户快照。校验 131 个租户数据。快照决策回归0c8bd5e5f3be4ce5582201513161181ddca37d6d,CDC 准入、快照分页、无效或过期决策及事务边界使用现有白盒测试执行-race -count=3并通过。白盒测试;0c8bd5e与00da052之间升级相关目录无变更。待解决点