Repository navigation
Description
Parent Issue
Parent issue: #32278
Detail of Subtask
Catalog ID: D20
Origin: A - Introduced by 4.2-to-main evolution or incomplete retirement on main
Evidence level: Incomplete retirement on main; confirm the supported compatibility window
4.2 versus main: provenance
The baseline still runs the transaction-trace collector, so its nine mo_debug tables/default data have consumers and are not inherently a baseline design error. Main removes the collector/runtime but still creates nine tables and inserts five defaults for fresh clusters. The concern arises after retirement.
Design problem, impact, and existing responsibility
The remaining trace package declares stopped-version rollback support, while the repository's current upgrade contract excludes downgrade. Establish the real supported rollback window. Do not retain consumerless initialization forever, but do not mechanically remove existing user data or edit frozen migrations.
Acceptance criteria
- Specify whether collector-bearing releases remain inside a supported rollback window and define actionable retention/retirement conditions.
- Fresh clusters beyond that boundary no longer create consumerless objects; existing clusters, historical data, and supported restore paths still satisfy their contracts.
- Review declarations, initialization, registrations, protection, documentation, and low-value retirement tests together without introducing a parallel compatibility mode.
Describe implementation you've considered
Treat this as a concrete retirement follow-up to #29249. Confirm the version owner's compatibility contract and real consumers, then consolidate bootstrap/upgrade registrations, planner protection, and tests. Stop unused fresh-cluster initialization once retirement conditions hold; existing-data cleanup requires an explicit product contract.
Additional information
Existing investigation and validation limits
Main trace/types.go documents the retained catalog-only package and references #29249; bootstrap still creates nine tables and five default rows. Baseline trace/service.go and other runtime consumers remain present. This is incomplete main retirement, not proof that the baseline tables themselves are wrong.
main investigation snapshot: pkg/txn/trace/types.go:15; pkg/bootstrap/service.go:127
4.2 baseline snapshot: pkg/txn/trace/service.go; pkg/txn/trace/types.go:29
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: #29249. Closed items identify implemented controls or historical context; they do not mean this subtask is already resolved.
Activity
[-][Subtask]: D20 [4.2→main] 完成事务 trace 退役:明确兼容边界并停止无消费者的新集群 catalog 初始化[/-][+][Subtask]: D20 [4.2-to-main] Complete transaction-trace retirement at the supported catalog compatibility boundary[/+]MatrixAdventurer commentedon Nov 6, 2026
分级建议:severity/s-1——txn trace 退役残留的清理类子任务,无用户可见行为变化记录。
所属模块:pkg/txn/trace 退役残留及其 fileservice 集成点。
疑似重复:未发现;相关 #27917(trace 目录冲突 fatal)已修复关闭。
建议负责人:XuPeng-SH(父单 #32278 发起人、本子任务 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
Fresh clusters no longer initialize the retired transaction-trace objects/default rows. Existing 4.2 trace tables and data, historical nine-table definitions, frozen migration registrations and protections are retained. The supported stopped-upgrade contract excludes downgrade; this is not permission to delete existing trace data or a new rollback mode.
The issue body and its one triage comment were reviewed. No newer counterexample or unfinished explicit implementation follow-up appears in the returned PR discussion. The existing triage comment is not additional validation, and this subtask does not complete parent #32278.
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 review source audits reported nine historical trace definitions matching released 4.2.5/4.2.8 and unchanged registrations/offsets. These are attributed audits. The author notes
pkg/txn/tracehas no direct test files. No tests or trace-data restore were run by this handoff, and the headerless returned patch is not an independently enumerated 66-file audit.QA boundaries
Compare a fresh current cluster with a stopped supported 4.2 upgrade: fresh initialization must omit the retired trace objects, while existing trace definitions/data and applicable protection/restore contracts remain intact. Check bootstrap/registration/documentation consistency and restart idempotence. Historical 4.2.8 trace/snapshot validation is reused evidence, not a newly executed final-head restore. Real release multi-CN and production-scale costs remain unmeasured; do not infer downgrade support or authorize existing-data cleanup.
Handing to @Ariznawlll for scoped QA.
Ariznawlll commentedon Nov 10, 2026
结论
测试通过。已按 #32307 在 main 交付的范围验收 trace 目录退休:新集群不再创建旧表;4.2 停机升级后既有表和历史数据保留。降级和自动删除已有 trace 数据不属于支持范围。
关键证据
0c8bd5e5f3be4ce5582201513161181ddca37d6d;源版本为官方 4.2.5,使用独立 1 LogService、1 TN、2 CN 环境,两个 CN 均校验git_version()。txn-trace控制入口创建三类过滤规则,并启用 trace-to-MO 生成实际事务事件。升级前保存完整内容;升级、中断后重启、从停机数据目录副本恢复 4.2.5 并再次升级后,三张过滤表和 924 条事件均逐条一致。九张历史 trace 表与原有五条 feature 配置均保留;131 个租户的数据和元数据校验通过。组合运行。create_version更新被观察到后强制结束承载 CN1、TN 和 LogService 的进程;重启后两个 CN 的租户及 trace 数据校验通过。单独二 CN 升级另连续三轮通过。中断与双 CN 验证。待解决点
恢复测试使用旧版本停机后的数据目录副本,不代表已经测试 snapshot/PITR 或备份工具的所有恢复路径;本次不是多台物理机器的分布式测试。其他 trace 事件类型及 ETL 对象存储文件未单独逐项构造。上述边界不扩大本次验收结论。