Repository navigation
Description
Environment
- MatrixOne commit:
01d60e1c4ded1b0f3fc1a4ecd75ce54e95e23b90 - Deployment: local shared-TN cluster with two CNs
- Scope: asynchronous IVFFLAT INCLUDE maintenance through ISCP
Problem
Asynchronous IVFFLAT maintenance cannot process an included FLOAT or DOUBLE
column containing NaN, +Infinity, or -Infinity. MatrixOne accepts and
stores these floating-point values in a base table, and a synchronous IVFFLAT
build copies them, but the async entries table remains empty or stops receiving
later DML.
Finite floating-point controls complete in the same cluster.
Minimal reproduction
set experimental_ivf_index=1;
create database ivf_async_include_float_special;
use ivf_async_include_float_special;
create table t(
id bigint primary key,
f double,
v vecf32(2)
);
insert into t
select result,
cast('NaN' as double),
cast(concat('[',result,',0]') as vecf32(2))
from generate_series(1,10) g;
create index ix using ivfflat on t(v)
lists=1
op_type 'vector_l2_ops'
quantization 'float16'
include(f)
async;After waiting well beyond the safe control's completion time:
select count(*) from <ix entries table>;
-- 0 (expected 10)Reproduction matrix
| INCLUDE type/value | async entries | synchronous entries |
|---|---|---|
DOUBLE NaN |
0 / 10 | 10 / 10 |
DOUBLE +Infinity |
0 / 10 | 10 / 10 |
DOUBLE -Infinity |
0 / 10 | 10 / 10 |
FLOAT NaN |
0 / 10 | 10 / 10 |
finite FLOAT/DOUBLE |
10 / 10 | 10 / 10 |
Three independently created DOUBLE NaN async databases remained at zero
entries while finite controls reached their full row count.
Root cause
pkg/iscp/util.go:appendFloat64 emits finite values as numeric literals, but
emits the special values as bare tokens:
if !math.IsInf(value, 0) {
strconv.AppendFloat(...) // emits NaN for NaN
} else if math.IsInf(value, 1) {
append("+Infinity")
} else {
append("-Infinity")
}The generated ISCP VALUES SQL therefore contains NaN, +Infinity, or
-Infinity without a type-preserving cast or quoted literal. These tokens are
not reconstructed as the stored floating-point values when the batch SQL is
compiled.
Expected behavior
Every valid FLOAT and DOUBLE value accepted by the base table, including
NaN and signed infinities, must round-trip through async IVFFLAT INCLUDE
maintenance without blocking the batch.
Regression coverage
FLOATandDOUBLE: finite, NaN, +Infinity, -Infinity, +0, and -0;- initial replay plus later INSERT/UPDATE;
- multiple special and finite values in one batch;
- synchronous build control;
- bit-level/sign-preserving comparison where applicable.
Activity
fix async ivfflat include and generated column updates (#29698)
Ariznawlll commentedon Oct 13, 2026
测试版本
main;commit:175a645a85994f2c95992d3aa8d6dacb6d9e167f;2026-10-13。原问题验证
异步 IVFFLAT INCLUDE(float) 的 NaN 初始值、更新后的 +Inf 和新插入的 -Inf,在 hidden entries 与源表对应;CDC 更新后数量正确。 对应定向用例在 MOTR 入口重复执行 3 次均通过(每次脚本内再执行 3 轮)。
Happy Path 覆盖
普通浮点初始建索引和 INCLUDE 对照一致。
Unhappy Path 覆盖
NaN/Infinity 特殊值不再使异步维护丢行或报错;删除/插入后入口数按预期。
白盒验证
除 SQL 返回值外,读取系统索引元数据与 hidden entries,并以源表作为独立判定基准。
回归测试
MOTR PR #234 中的 issue_29012_29013_29015_29016_29019_29053_ivf.py 已提交;离线 CI 通过,仍待正常 review/merge。该缺陷由确定性语义/类型/协议边界触发,不需要另加 big-data 或 chaos 才能验收。
测试证据
PR 验证记录及 CI 运行。
测试结论
测试通过。