Skip to content

[Subtask]: D13 [amplified-on-main] Reduce internal protocol gates, fallbacks, and repeated plan scans to supported compatibility needs #32291

Open

Description

@XuPeng-SH

Parent Issue

Parent issue: #32278

Detail of Subtask

Catalog ID: D13
Origin: C - Baseline design debt expanded or amplified on main
Evidence level: Complexity/work confirmed by source and microbenchmarks; validate each benefit

4.2 versus main: provenance

The baseline already has protocol gates, such as ordered aggregate requiring MORPC version 6. Main expands the latest version from 11 to 134 and retains more old-peer encodings, legacy branches, and execution probes across grouping, expression compilation, and pipeline sending. This expands an existing compatibility surface; version counts alone do not prove a defect.

Design problem, impact, and existing responsibility

The repository's current upgrade contract is full-cluster shutdown, so purely internal mixed-version needs require a supported use case. Ordinary local compilation can still run RequiredRemoteExpressionFeatures over the plan because it also contains necessary persisted-expression checks. Some remote execution probes selected workers sequentially with a total 5s budget and no cross-execution reuse.

Acceptance criteria

  • Every retained compatibility class has a real consumer/support contract. Remove superseded paths without breaking old persisted data or backup restore.
  • Necessary local semantic validation is independent of remote probing; ordinary local queries do not collect an entire plan solely for unsupported compatibility.
  • Compare representative local/distributed compilation, allocations, and execution cost while retaining invalid-input, cancellation, and external-boundary behavior.

Describe implementation you've considered

Confirm supported product boundaries and separate persisted data, backups, and external protocols from unsupported internal old-peer compatibility. Preserve necessary semantic validation; retire gates/encodings/fallbacks and their tests/configuration when no supported consumer remains. Do not hide unnecessary mechanisms behind another capability cache.

Additional information

Existing investigation and validation limits

Function microbenchmarks measure about 37us/9,352B for 8 nodes x 24 columns and 369us/148,152B for 8 x 256; a small plan is about 0.93us. Some mock remote fixtures make one probe per execution. These are not end-to-end regressions or real network latency. Do not delete code merely because its name contains legacy.

main investigation snapshot: pkg/sql/compile/expression_protocol.go:37; pkg/sql/colexec/group/exec2.go:119; pkg/sql/compile/remoterun.go:129; .agents/skills/mo-dev/references/upgrade-compatibility.md:1

4.2 baseline snapshot: pkg/sql/compile/remoterun.go:1504; pkg/defines/const.go:50

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.

Activity

  1. self-assigned this
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. changed the title [-][Subtask]: D13 [base→main放大] 按实际兼容合同收缩集群内部协议门控、fallback 与重复计划扫描[/-] [+][Subtask]: D13 [amplified-on-main] Reduce internal protocol gates, fallbacks, and repeated plan scans to supported compatibility needs[/+] on Nov 5, 2026
  4. MatrixAdventurer commented on Nov 6, 2026

    @MatrixAdventurer
    Contributor

    分级建议:severity/s-1——MORPC 协议门控/降级路径的简化类子任务,正文按源码确认,无故障或数据错误记录。
    所属模块:pkg/common/morpc(协议门控与降级)。
    疑似重复:未发现直接重复;相关 #25191(open)、#30408(closed)。
    建议负责人:XuPeng-SH(父单 #32278 发起人、本子任务 assignee)。
    本操作由LW授权的MOI智能体提交

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions