Repository navigation
Todo
Labels
Description
Is there an existing issue for the same feature request?
- I have checked the existing issues.
Is your feature request related to a problem?
Async vector and fulltext2 indexes stall forever on one row whose value the index cannot store (#31493).
ISCP treats every per-row error as transient. The watermark stays at the start of the range, the same range is replayed, and the same row fails again. Every later change to that table never reaches the index. Queries keep using the stale index without any warning.
Because rows are batched, one bad row also fails its neighbours: up to 8192 events for HNSW, a whole REPLACE ... VALUES statement for IVFFLAT, a whole CDC blob for fulltext2.
No skip, quarantine or dead-letter path exists for row values in ISCP today. This affects HNSW, IVFFLAT, CAGRA, IVFPQ and FULLTEXT2.Describe the feature you'd like
Contract (decided by @cpegeric, 2026-10-28)
A source row whose value an index cannot store is left out of that index, and recorded with its reason. The index keeps syncing. This follows Elasticsearch's ignore_malformed (the field is skipped and the document's field name is recorded in the _ignored metadata field).
- Every index (HNSW, IVFFLAT, CAGRA, IVFPQ, FULLTEXT2) gets a hidden
ignoredtable, created with the index: one row per source row not in the index, with the primary key, the reason and the time it was recorded. - Invariant: the
ignoredtable holds exactly the rows that exist in the source and are not in the index.- Deleting a source row removes it from
ignored. - Updating it to a storable value indexes it and removes it from
ignored. - Updating it to another unstorable value replaces the reason.
- REINDEX and TRUNCATE clear
ignoredand refill it.
- Deleting a source row removes it from
- A synchronous CREATE INDEX rejects the row instead (decided by @cpegeric, 2026-10-28). The user is waiting on the statement and it rolls back as a whole, as Elasticsearch rejects a malformed document at write. This covers
CREATE INDEX,ALTER TABLE ... ADD INDEXand an index declared inCREATE TABLE, when they build the index synchronously. - Every other path ignores and records the row, by the same rule: an asynchronous build, incremental sync (CDC), REINDEX (including
FORCE_SYNCand the rebuild after a restore) and the ALTER TABLE rebuild. These run without a user to answer, or on an index that may already hold ignored rows. - A query vector the index cannot store is still rejected.
- Each sync iteration that ignores rows writes one summary log line: the index, the count, the first few primary keys and the reason.
- Errors that are not about one row's value keep today's behaviour: infrastructure errors are retried, and model or storage failures fail the job.
- DATALINK (fulltext2): a missing stage, a missing file or a text-extraction failure is ignored and recorded, e.g.
datalink stage://s/docs/a.pdf: file not found. Transient I/O errors (timeouts, connection errors, throttling) are still retried. The row is indexed again when it is next updated or at REINDEX.
SQL
SHOW INDEX IGNORED FROM [db.]tbl [WHERE expr]
-- e.g. SHOW INDEX IGNORED FROM t WHERE Key_name = 'i'- One row per ignored source row of every index of the table, with the columns
Key_name(the index),Primary_key,ReasonandIgnored_at. The names followSHOW INDEX, andWHEREfilters them as inSHOW INDEX. - Users never see hidden table names.
- On a partitioned table each partition's index has its own
ignoredtable, and SHOW lists all of them.
Existing indexes (decided by @cpegeric, 2026-10-28): no upgrade step. An index created before this change has no ignored table and keeps its previous behaviour until it is dropped and created again; REINDEX does not add the table.
Describe implementation you've considered
What each index cannot store today (per-row, fails identically on every replay):
| Index | Values to ignore |
|---|---|
| HNSW | element overflow when narrowing (float16/bf16 > 65504, vecf64 into f32), wrong dimension, empty vector |
| IVFFLAT | float16/bf16 entry overflow, int8 scale overflow, no finite distance to any centroid |
| CAGRA/IVFPQ | nothing is checked at CDC time today; bad values reach the event log and fail later at rebuild or search. Add the same element checks. |
| FULLTEXT2 | JSON parse failure (json parser, tuple-json mode), DATALINK resolution failure (as above) |
NULL vectors and NULL text are already handled (delete or skip) and do not change.
The check runs per row before batching, in the ISCP writer, so one bad row never fails its batch. The same check backs the sync build, so built and synced indexes ignore the same rows. Ignored rows are written in the same transaction as the index sync and its watermark, so a replay neither loses nor duplicates them.
Delivery:
1. HNSW: the `ignored` table type, the ISCP per-row ignore and record path, the synchronous CREATE INDEX rejection, and `SHOW INDEX IGNORED`. Fixes #31493.
2. FULLTEXT2 (JSON and DATALINK).
3. IVFFLAT (writer check plus a matching filter in its SQL build).
4. CAGRA and IVFPQ.Documentation, Adoption, Use Case, Migration Strategy
User docs: the contract above and `SHOW INDEX IGNORED`, with the Elasticsearch `ignore_malformed` / `_ignored` comparison.
Tests, per index type:
- #31493's repro: the bad row is ignored and a later valid row is indexed and returned.
- One bad row inside a full batch: its batch neighbours are indexed.
- Insert bad, update to valid (leaves `ignored`), update to another bad value (reason changes), delete (leaves `ignored`).
- A synchronous CREATE INDEX fails on such a row and leaves no index; REINDEX and async builds ignore the same rows; partitioned table; clone and restore.
- `SHOW INDEX IGNORED`: several indexes, `WHERE Key_name = ...`, a partitioned table, a table without ignored rows, an index created before this change.Additional information
Fixes #31493.
Later, optional: a strict mode that rejects unstorable values at INSERT/UPDATE (Elasticsearch's default when ignore_malformed is false).
References:
Activity
[-][Feature Request]: ignore and record rows an async vector/fulltext2 index cannot store (_ignored table, index_ignored())[/-][+][Feature Request]: ignore and record rows an async vector/fulltext2 index cannot store (ignored table, SHOW INDEX IGNORED)[/+]feat(hnsw): ignore and record rows an index cannot store; SHOW INDEX …
XuPeng-SH commentedon Nov 2, 2026
合并范围核对:PR #31596 已于 2026-11-02 合入 main,merge SHA
da44e7ecce310f285fb867eb46a02981009ed99d,本次只交付 HNSW(对应 #31493),含统一 MAX_BAD_RECORDS、ignored 状态、SHOW、恢复与资源边界。IVFFLAT、CAGRA、IVFPQ 和 FULLTEXT2 仍在本总项后续范围,因此本 issue 保留研发负责人,不作为整体交付转测或关闭。旧索引需 DROP/CREATE 才有 ignored 表,REINDEX 不新增该表。此为远端范围核对,非本轮本地测试或验收通过。feat(cagra,ivfpq): ignore and record rows the index cannot store (#31583
XuPeng-SH commentedon Nov 2, 2026
合并范围更新(非整体转测):PR #32036 已于 2026-11-02 21:25:22 UTC 合入 main,merge SHA
07c06078c2731f745c46aa9d12c082a61d5b9dab,在此前 #31596 的 HNSW 交付之外补齐 CAGRA / IVF-PQ 的 ignored rows 路径(构建、CDC、查询向量校验、REINDEX / restore 及 SHOW 状态)。该 PR 明确仍留下 IVF-Flat 和 FULLTEXT2,因此本总项继续保留研发负责人,不作为全部范围交付或验收通过。验证证据来自 PR 作者报告:GPU ignored suite 173/173、vector suite 1509 statements,以及带/不带 gpu tag 的相关单测和 lint;本轮仅核对远端合并和范围,未本地运行测试。后续完整交付需覆盖剩余两类索引;CAGRA / IVF-PQ 回归建议关注坏行更新/删除、短子索引与分片尾部、恢复/重建和旧索引兼容边界。旧索引仍需 DROP/CREATE 才获得 ignored 表,REINDEX 不会补建。
cpegeric commentedon Nov 4, 2026
Decision (@cpegeric, 2026-11-04) for the IVF-Flat part of this issue (#32096):
MAX_BAD_RECORDSon a synchronous IVF-Flat index is checked against the ignored rows the statement's transaction sees. Transactions open at the same time each stay within the limit and may together commit past it, by at most the rows each could add. Once committed, every later statement that records a row fails until rows are fixed or deleted, or REINDEX runs.Rejected: a lock serializing the statements that record rows on one index. It would make the limit exact across transactions, but serializes bad-row DML and adds a lock the DML path does not take today. Asynchronous builds and syncs have one writer and are not affected. Recorded in
docs/design/20261028-index-ignored-rows.md(The limit).fix(ivfflat): match a dotted key name exactly, reject a NaN int8 code…
test(ivfflat): a quoted primary key name holding a dot records its rows
fix(ivfflat): record an ENUM key that names no member in strict mode
feat(ivfflat,fulltext2): ignore and record rows the index cannot store (
slyunnn commentedon Nov 17, 2026
Feature verification for #31583 (ignored index rows) (2026-11-17)
Test environment
Latest-main review: baseline
43addc16ba30c3e5a0feb11447078092a5fc3953, pinned by a successfulgit fetch originat the start of this review. A fresh, unmodified checkout was built, including native dependencies. Binary build information and SQLgit_version()both identify43addc16ba. Executable SHA256:99412e505541b82a5e3d4082bd0e10f40ebd5652acad81c2c480ce9085897df6; native-library hashes and build logs are retained.Related implementation PRs reviewed: HNSW #31596, CAGRA/IVF-PQ #32036, and IVF-Flat/FULLTEXT2 #32096, with the revised design at the pinned commit. All implementations are ancestors of the baseline. The reviewed paths include build admission, CDC tracking/flush, parameter validation, SHOW rewriting/privileges, legacy no-ignored fallbacks and restore initialization.
Dedicated macOS ARM64 deployment: one CN, one TN and one logservice, fresh owned data directory; MySQL/TCP on loopback port
26001, PyMySQL and official MOTR runner. A genuine task-owned MinIO service exercised official S3 DATALINK resolution and CDC. No GPU or configured remote Kubernetes context was available; GPU implementation review and shared CPU admission tests do not establish actual cuVS execution.Earlier same-day baseline: the initial work used
e765c5fd44e842167d4271c37af6d25586511e16. Its earlier296/296official BVT, 23 semantic checks, two batch checks and 45 exploratory assertions remain historical same-day evidence. They are not counted as tests of the new baseline below.Test results
The following are new executions on
43addc16ba, with 67 passing named direct assertions in addition to the separately reproduced product failure:20349), explicit allowance and exact ignored identity, all-bad plus NULL rejection (20350), failed limit reduction retaining old parameters/ignored state, bad-to-NULL cleanup, and all-bad REINDEX rejection. HNSW/IVF-Flat async default builds stopped and raising the limit recovered them. FULLTEXT2 uses a synchronous initial build followed by async CDC; it is not assigned an invented separate async-CREATE path.20101; after granting SELECT the exact ignored row/code was visible.20352; valid neighbors remained searchable; REINDEX after repairing the object cleared its record and restored search; deletion cleaned ignored state.retryingwithout quarantining the transient failure; restarting the same MinIO data let official CDC self-heal.CAGRA/IVF-PQ: reviewed their build filters, held-row/tail routing, CDC writer and query admission hooks. Ten newly written shared-admission boundary cases passed for actual
CheckStorableandCheckQuery: empty/zero vectors, finite half rounding versus overflow, f32 control, L2 overflow, NaN and infinity. This is CPU component evidence only; actual GPU builds, CDC, search and shards remain unexecuted.Old-index compatibility: constructed genuine pre-feature HNSW/IVF-Flat/FULLTEXT2 indexes with no ignored metadata using a fresh build of
06a0659e71ed49f19f1b2349414e38651d088fac(immediate parent of the HNSW feature merge). Latest main refused to start that data:catalog 4.0.7 offset 41 differs from binary offset 44; 4.0.7 is frozen and further migrations require a new catalog version. An earlier reused old artifact was also rejected (4.0.18versus4.0.7). Neither gate was bypassed and no upgrade success is claimed. Post-upgrade REINDEX/no-migration and DROP/CREATE opt-in remain blocked, rather than passed by metadata simulation.Bugs
Confirmed: #32856 — FULLTEXT2 MERGE bypasses MAX_BAD_RECORDS enforcement. Reproduced in 3/3 independent tables, with an ordinary-REINDEX negative control and subsequent successful CDC.
Given one ignored row and
MAX_BAD_RECORDS 1:ALTER TABLE t ALTER REINDEX ix FULLTEXT2 MAX_BAD_RECORDS=0returns20349and rolls back the parameter change.MERGEsucceeds and persistsMAX_BAD_RECORDS=0while SHOW still reportsIgnored_rows=1,State=running, no error.The implementation accepts the parameter update, then dispatches MERGE directly to compaction without the ordinary rebuild's ignored-count check. See dispatch and parameter persistence. Impact is the configured bound on omitted source rows; this is not the permitted concurrent synchronous IVF-Flat overshoot.
Independent tracking is verified: assignee
matrix-meow, labelskind/bugandneeds-triage, typeBug, milestoneMO-202611. No service-source fix was made. No additional product bug was confirmed in the executed scope.Regression coverage
3c636f79155d0449eda903a9bddf050ab5dac671, remains open/unmerged. Its three lifecycle/atomicity cases plus the existing [Bug]: float16 HNSW CDC stalls after committed out-of-range vector and hides later valid rows #31493 original reproduction were rerun on the new baseline: 4/4 passed, zero failures/skips, 91.40 seconds,-j 2. This covers actual NULL/primary-key/REPLACE/upsert/rollback/TRUNCATE behavior alongside the new probes; case workers do not prove engine parallelism.test/feature-31583-merge-limit, test commit8cf2c8b8effea3ee0fd1265efbb3289877d7ef2b. Remote branch/commit verified. Official replay and recording both produced 0 passed / 1 failed, atmerge_enforces_limit. The intended-correct baseline was not replaced by the defective output; it has no successful current-product recording. The draft is blocked by the product fix, not presented as passing.296/296one765c5fd44with documentednometa; it was not rerun or attributed to43addc16ba.Evidence and not covered
Local deliverables retain fresh-build logs/hashes, exact pinned sources, new SQL/expected/actual results and raw errors/warnings, three minimal reproductions, official MOTR journals and failures, new component test source/JSON output, MinIO fault events, snapshot/crash state, genuine legacy fixture metadata and catalog-gate failures. Local evidence is not publicly accessible through this comment; credentials are redacted from the archive.
Preparation failures were retained separately: a legacy native-build completion-marker failure followed by the documented prebuilt-native build target using freshly compiled same-checkout native artifacts; an initial component-test dynamic-library loader failure corrected by an explicit rpath; a regression suite-root mismatch; and the legacy upgrade gates above. These are not silently counted as product passes.
Outstanding necessary scope: actual GPU CAGRA/IVF-PQ behavior and old-index post-upgrade behavior. Further extensions include controlled interruption inside the atomic index/ignored/watermark commit, GPU shard boundaries and large-scale resource checks. One successful clone/snapshot/crash scenario does not certify every recovery window.
Tracked MatrixOne service source remained unchanged. Owned SQL databases/users/roles/stages/snapshot and S3 bucket were cleaned; task services stopped and task data directories removed after evidence collection. Pre-existing user data/services were retained. The feature issue remains open. All updates for this date are consolidated in this comment.
Conclusion
Blocked for complete five-index acceptance because GPU execution and genuine old-index upgrade validation could not complete. The executed scope includes one confirmed product failure, independently tracked as #32856 with a failing draft regression. Passing assertions, confirmed failure, historical results and blocked coverage are reported separately; this is not an overall Passed conclusion.
slyunnn commentedon Nov 19, 2026
Feature verification for #31583 (CPU vector and FULLTEXT2 ignored-row scale) (2026-11-19)
Test environment
98796a5456d93b26d6051c546f9a168c0085c0ad, latest remoteorigin/mainsuccessfully fetched at this rerun's dispatch. Feature PRs #31596, #32036, and #32096 are verified ancestors. This is a fixed tested baseline, not a claim that main has remained unchanged since dispatch.46d9e8f465ca864cb645a494f167c9cf8c719dc0. Regression PR #1955 remains open, draft, unmerged.sha256:7ccfa4cb5dc406b008abe6c51054d6603412e26366469a8c4ccb2084c0a8c765; CN binary SHA256:757070301355ec4821c9630d4d4c4ff0281fb6e190c1cd0a3179695982580294. Exact-source checkout/build logs, six product Pods' actual image IDs, startup/replacement/handoff binary receipts and runtimegit_version()agree with the target. No MatrixOne service source was modified.1 CN / 1 TN / 3 Logservice / 1 proxy, private authoritative MinIO and a separate real DATALINK MinIO fixture. CPU and FULLTEXT2 run serially with separate databases and evidence. Namespace/cluster UIDs remain identical through CN replacement and workload handoff; CPU database absence is checked before FULLTEXT2. MySQL/PyMySQL connects through task-local forwarding; private endpoints/credentials are withheld.1,048,576ignored +8,192initially valid records, followed by twenty acknowledged mutation transactions. CPU ran16:21:07–16:52:33; FULLTEXT2 ran16:52:49–17:20:26(Asia/Shanghai).Test results
118 recorded checks passed: CPU setup 61, CPU recovery 11, FULLTEXT2 46; zero failed checks or probe exceptions. Counts include runtime guards and are not 118 independent feature scenarios.
1,048,576ignored keys with raw20348, preserving all valid search results. EXPLAIN retained vector-index scan evidence.1,048,576ignored,8,212searchable and1,056,788source keys. Checks distinguish changing membership from unchanged counts.FORCE_SYNC MAX_BAD_RECORDS=1048575returned raw20349; warnings, unchanged parameters and complete ignored identities were retained. Rebuilding with bound1048576passed.9999999was searchable for both algorithms. Authoritative shared storage remained available.20351classified invalid JSON. Twenty repair/delete/insert rounds preserved exact ignored and searchable membership. Too-small REINDEX returned raw20349, preserving metadata and ignored identities; valid-bound REINDEX and complete source/search verification passed.20352; long permanent reasons satisfied the asserted880 < UTF-8 bytes <= 1024bound. Valid documents remained searchable. Repair/delete CDC and REINDEX after actual object repair changed the exact expected sets: ignored768 → 640 → 576, searchable256 → 320 → 384.retryingwith connection refusal, without adding transient errors to the permanent ignored set. After a new store Pod appeared, acknowledged key2000became searchable. Complete576ignored and961source keys matched expected membership.9999999was searchable. Single-object fixture deletion completed without the earlierMissingContentMD5error. These previously unexecuted completion checks now passed.The archived results were independently checked against seed/mutation formulas: all 42 compressed ignored/source/search files matched complete expected identities and, where applicable, raw error codes. This supplements the actual live SQL assertions; it is not another live execution.
Bugs
No new reproducible MatrixOne product bug was found in these two requested scale workloads. Existing #32856, concerning FULLTEXT2
REINDEX MERGEbounds, remains open; this run does not exercise that path or claim it fixed.Partition remains explicitly deferred. #32881 / #32882 were closed not planned, not verified fixed.
Regression coverage
PR #1955 supplies the shared-cluster Nightly regression at the tested commit. Its 22 native Linux harness guards passed before deployment; these are distinguished from the 118 live product/runtime checks above. The linked real TKE run passed with both workload receipts and final cleanup. The PR is still draft/unmerged; CI success is not presented as merge completion. No additional MOTR case was needed for these scale/fault scenarios, and no partition MOTR case was submitted.
Million-row data is relevant to ignored-set cardinality across build, incremental maintenance, REINDEX and recovery. The run collected 168 cluster resource samples and stage logs. Client chunks,
kubectl top, case scheduling and plan text do not prove physical block/batch/spill or engine parallelism. Shared caches/process state mean this is not an independent cold-start performance comparison; no latency SLA or general2h/24hstability pass is claimed.Evidence and not covered
Public evidence: completed execution job, raw workload artifact, image/source build job, and test PR. Artifacts follow repository retention.
Local evidence is retained under
outputs/tke-31583/run-444837/, with independent comparison results in444837-independent-identity-check.json, raw job/build logs, baseline ancestry and an evidence SHA256 inventory. Local evidence is not publicly accessible. The cleanup receipt verifies only this run's owned namespace; unrelated resources were not modified.Earlier failures remain recorded locally and are not reclassified as passes: the November 18 run had fixture/namespace cleanup failures and missed final JSON checks; 44448035070 stopped before SQL because Logservice Pods could not obtain CPU. Its namespace was verified deleted. The current run directly closes those execution/cleanup gaps. No failed/in-progress comment is being published; this comment records the completed successful rerun.
Outside this two-workload acceptance: partition, GPU CAGRA/IVF-PQ, genuine old-index upgrades,
REINDEX MERGE, overlapping transactions, multi-CN and general long-duration stability. The CN failure was injected at a quiescent checkpoint; it does not certify an in-flight commit failure window.Conclusion
Passed — the two requested CPU vector and FULLTEXT2 ignored-row scale workloads on the pinned main commit. Live assertions, actual CN and DATALINK recovery, complete membership comparisons and final resource cleanup passed. This is not full five-index feature acceptance, and it does not close #31583 or the separately tracked bug.