You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: guard persisted SQL and expressions across rolling protocol downgrade #28883
The IP-function compatibility change in #28800 protects transient distributed
pipelines, and its writer-side admission now protects catalog-bound DEFAULT, GENERATED, CHECK, and ON UPDATE plan expressions while the
deployment common protocol is below v71. Two persisted paths still need a
deployment-level contract beyond that PR:
A VIEW stores SQL rather than the bound plan.Expr; an old CN can later
rebind the SQL locally and execute the pre-v71 IP semantics.
A CN that is downgraded or reintroduced after the common protocol was
raised can read an already-persisted expression locally without crossing
the remote pipeline admission gate.
The same issue applies to any future catalog consumer that evaluates persisted
SQL/expressions locally.
Reproduction shape
During a rolling upgrade, create a persisted expression such as
CREATETABLEt (
n DOUBLE,
ip VARCHAR(32) GENERATED ALWAYS AS (INET_NTOA(n)) STORED,
CHECK (INET_NTOA(n) <>'')
);
or a view using INET_NTOA/INET6_ATON. If an older CN is allowed to read or
execute the catalog object after the newer protocol has been advertised, the
old registry either cannot decode a new overload or silently applies the old
meaning of an existing overload. This is a deployment admission/lifecycle
gap, not a per-row executor failure.
Required direction
Define one deployment-managed catalog-expression compatibility contract and
apply it to all persisted SQL and bound-expression readers/writers:
do not raise the common protocol until every catalog reader is upgraded;
reject CREATE/ALTER/VIEW publication and old-reader re-entry while the
contract is below the expression's required version;
keep the check at the final catalog publication/read admission boundary, so
CREATE LIKE/COPY, ALTER replacement, restored metadata, and reattached CNs
cannot bypass it;
add a two-generation rolling-upgrade test covering an old reader, a new
writer, a downgrade/rejoin, and the unchanged catalog/data on rejection.
This is intentionally separate from #28800's transient remote-pipeline fence;
that PR now has the minimal writer guard for bound table expressions, but a
shared catalog admission contract is needed for arbitrary old-reader
re-entry and SQL-backed views.
Activity
fix: correct IPv4 and IPv6 function semantics (#28800)
fix: correct IPv4 and IPv6 function semantics (matrixorigin#28800)
fix: correct IPv4 and IPv6 function semantics (matrixorigin#28800)
fix: correct IPv4 and IPv6 function semantics (matrixorigin#28800)
Ariznawlll commentedon Sep 24, 2026
测试版本
maind7d940e93bd037e9aacdc0f1256b91e32df84642原问题验证
当前 main 尚不能执行 issue 要求的“两代 CN 滚动降级 + 持久化 SQL/expression 写入与读取保护”端到端验收。#29060 合入的是 control-plane barrier 的内部消费者和控制契约,但 PR 明确保留以下限制:
CatalogMetadataMaintenance默认关闭;MetadataReadsEnabled固定为 false;因此 current main 没有可从产品入口激活并完成该协议的完整业务路径,无法据此证明滚动升级/降级验收项已经实现。
正常场景覆盖
#29060 的 HAKeeper、PB、LogService、CN 和 Proxy 包级测试可验证已合入的 barrier 内部状态机、snapshot recovery、participant observation 和 capability arbitration;这些结果说明底层契约可用,但不等于 issue 的产品级滚动验收完成。
异常与边界覆盖
MetadataReadsEnabled进入启用态。白盒验证
#29060 的说明明确界定了实现边界:该 PR 实现 internal consumers/control contracts,不提供 synthetic business completion;view lifecycle runtime-disabled,后续 producer 工作仍归 #29005/#29006。因此 issue 的端到端验收依赖尚未完成。
回归测试
暂不加入 MOTR。需要先完成并开放 activation/producer 路径,再在两代二进制的滚动环境中增加 upgrade、downgrade、旧 CN 重入、持久化表达式读取和拒绝写入的回归。
测试证据
测试结论
测试不通过。