Repository navigation
feat(ivfflat,fulltext2): ignore and record rows the index cannot store (#31583) - #32096
Conversation
IVFFLAT and FULLTEXT2 now leave out the rows they cannot store, record them in the index's ignored table, and stop past MAX_BAD_RECORDS, as HNSW, IVF-PQ and CAGRA do. SHOW INDEX IGNORED and SHOW INDEX STATUS cover both. IVFFLAT - product_l2 checks each probe row against the entry type (QUANTIZATION range, int8/uint8 code, squared norm, non-finite) and records the rows it leaves out; the index reaches it as JSON on CENTROIDX, which only internal SQL may pass. - k-means sampling skips such rows; too few samples seed one NULL centroid. - Synchronous DML follows the limit; the async sync records and removes rows by key; a query vector the index cannot store is rejected. FULLTEXT2 - Text the json parser cannot parse (20351) and a DATALINK that cannot be read (20352) are recorded with their message; transient errors retry. Keys read as users see them: composite keys as (a, b), ENUM keys as their member, in SHOW INDEX IGNORED and in the stop messages. issue matrixorigin#31583 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
…ored table Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fixed in 84982fc. A composite primary key is now the hex literal of its serial,
Validation:
|
The reason of a row the index cannot read held the whole error message, which carries the malformed JSON document, so a value near the column length overflowed the VARCHAR(65535) reason column and failed the build or the sync it was allowed to skip. The reason is now at most 1024 bytes, cut at a character boundary, with invalid UTF-8 replaced. The GPU session-vars case lists the ignored table an IVF-PQ index has. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
mo-bot review · Commit: Review belongs to an older commit; it is not a review of the current head. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 588ef78d073c8e1123b2352a14c724a663b02914
Assessment: approve
The design coherently reuses existing admission, ignored-row and ISCP owners. Prior blocking concerns are resolved; transaction-visible quota enforcement remains an accepted design choice.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Reviewed all 83 changed files, all 55 discussion entries and linked issue 31583; saved the review map, plan, discussion ledger and source assessment.
-
Local checks passed: preflight, exact parser regeneration/comparison, protobuf descriptor audit, Go1.27.1 parsing/gofmt of 69 files, and vectorindex internal-test import graphs under CPU/gpu tags. Receipts and retained logs match; source remains unchanged.
-
Frozen exact-head CI reports successful shared build, UT/SCA/coverage, PROXY and PESSIMISTIC BVT, and CI Required.
Limitations:
-
No local product tests, live SQL/CDC probes or GPU execution. Raw CI selections/logs are unavailable; older author runtime reports are corroborating evidence only.
-
All-bad composite build errors can still print raw serialized key bytes; this is a nonblocking diagnostic inconsistency.
|
@aunjgr @iamlinjunhong please review the PR. thanks |
|
mo-bot review · Commit: New discussion was assessed; the previous review remains unchanged. |
iamlinjunhong
left a comment
There was a problem hiding this comment.
Reviewed exact head 588ef78d073c8e1123b2352a14c724a663b02914 against main at 57e7871e500e6e3d35fd352a092ee41b03a979fc, within issue #31583's IVF-Flat/FULLTEXT2 ignored-row scope. No remaining in-scope findings were confirmed; APPROVE.
Previous feedback is reconciled. The composite temporal-key display issue now uses the complete serialized key as a hex literal, preserving fractional seconds and ENUM ordinals; the SQL regression distinguishes same-second keys, filters the displayed key, and finds its source row. The author explicitly replied. FULLTEXT2 recorded reasons are now bounded to 1024 bytes at a UTF-8 character boundary, with build/sync regression coverage and a direct author reply. Earlier empty-sample, FK reinsertion, dotted-identifier, GPU import, non-finite quantization, ENUM replay and spill-cleanup fixes remain present. Transaction-visible quota enforcement remains the accepted scope decision.
Validation: inspected the complete change set and relevant build/DML/sync/search consumers; checked the generated parser's semantic-action delta and verified that the protobuf descriptor adds only ProductL2.ignored string field 6. The read-only PR artifact check passed. Local Go/SQL/race/GPU tests were skipped because source analysis resolved the review questions; supplied CI conclusions and author test reports were reused within their stated scope, without claiming local runtime reproduction. Source files were unchanged.
CI snapshot: the 29 checks are not all successful: 13 success, 14 skipped and 2 neutral; none failed or pending. CI Required passed. Failed-check investigation was skipped because the supplied snapshot contains no failed checks.
|
mo-bot review · Commit: New discussion was assessed; the previous review remains unchanged. |
# Conflicts: # pkg/pb/pipeline/pipeline.pb.go
Conflicts: pipeline.pb.go and mysql_sql.go regenerated from the merged proto and grammar; ivf_create.go keeps the branch's ivf_getVersion seam and nil-sample guard with main's admitted policy. main's index-maintenance admission (matrixorigin#32032) did not cover the fulltext2 ignored table this branch adds: fulltext2_create wrote it without a policy, from a name in its SQL-supplied config. fulltext2_create now admits the ignored table as a target, writes it under the policy, and the planner's maintenance roles and validation include it (fulltext2.MaintenanceOperands). Tests updated for the admission. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in merge main's matrixorigin#32032 added TestHiddenIndexUserAccess and vector_ivf_clone_sync counts of physical index tables. With this branch, IVF-Flat and FULLTEXT2 also own an ignored-row table, so each group has 4 tables (was 3) and the clone_sync table has 8 physical tables (was 6). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: bdb65a2ac2165d8df8c9123a952901bf9fb25650
Assessment: request_changes
The shared ignored-row design is coherent, and earlier findings are resolved. One regression remains: transient AWS S3 failures can permanently omit valid FULLTEXT2 documents.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
- P2
pkg/fulltext2/ignored.go:42: An AWS-backed DATALINK read exhausts its SDK retries with HTTP 429 or 503 during FULLTEXT2 build or CDC.
Impact: The error becomes ErrIndexDatalink. Within MAX_BAD_RECORDS, CDC omits the valid document and advances its watermark, so endpoint recovery does not retry it; without allowance, maintenance stops permanently. Extend the existing retry classifier to recognize AWS throttling/server errors before this permanent fallback, with provider-specific regression coverage.
Evidence: The exact-source component probe in provider-probe.log (receipt checks/1794081368127428496-4.json) shows AWS SDK retryable=true but IsRetryableStartupError=false for both statuses, while MinIO equivalents return true. AwsSDKv2.Read/mapError preserves these errors; FULLTEXT2 records them through fulltext2_sqlwriter.go and commits ignored rows with the watermark in fulltext2_consumer.go:123. This violates the transient/throttling retry contract in docs/design/20261028-index-ignored-rows.md:225.
Validation:
-
Reviewed the complete delta and affected consumers; reconciled all 61 discussion keys in discussion-assessment.json.
-
Isolation preflight passed; the provider component probe confirmed the AWS/MinIO classification discrepancy.
-
MySQL parser regenerated byte for byte; complete protobuf descriptor comparison found only ProductL2.ignored field 6.
-
Static CPU/GPU repository import closures passed for eight affected package roots, including internal tests.
-
Six current-head check receipts reconciled with retained evidence; source remains unchanged.
-
Frozen CI snapshot reports 13 successful, 14 skipped and 2 neutral checks.
Limitations:
-
The provider probe uses exact helper bodies and pinned direct SDK versions under Go 1.26.6; no live S3 or public SQL reproduction was run.
-
Full native CPU/GPU suites were not run locally. Frozen CI lacks individual test logs; author GPU/race results remain attributed historical evidence.
…r fails The retry classifier read the HTTP status only from MinIO errors, so an AWS, Aliyun OSS or Tencent COS response of 408, 429 or 5xx that the SDK stopped retrying was taken as a datalink the index cannot read, and its row was left out. It now reads the status from every object-storage SDK. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Addressed the finding of the review of
Validation: |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: c30de147943caed6faf91e42e2c11c24b6ee54ed
Assessment: request_changes
Existing ignored-row and ISCP reuse remains coherent. The AWS 429/503 cases are fixed, but one retryable API-code case still causes permanent omission of valid FULLTEXT2 documents.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
- P2
pkg/fileservice/error.go:108: An AWS-backed DATALINK read exhausts SDK retries with HTTP 400 and API code RequestTimeout during FULLTEXT2 build or CDC.
Impact: The status check and network fallbacks return false, so DatalinkError converts this transient failure into ErrIndexDatalink. Within MAX_BAD_RECORDS, the document is omitted and CDC can advance its watermark without retrying it after endpoint recovery. Recognize retryable provider API codes alongside HTTP statuses, while retaining permanent-error controls.
Evidence: The pinned AWS SDK v1.41.5 explicitly treats RequestTimeout as retryable; aws-retry-oracle.log confirms this for the wrapped HTTP 400 error. Source tracing finds no matching project classifier branch. AwsSDKv2.mapError preserves non-404 errors; fulltext2/ignored.go:37 classifies this error as permanent, and fulltext2_consumer.go:125-139 commits ignored rows with the watermark. See source-assessment.md and validation-ledger.json.
Validation:
-
Reviewed all 89 paths, affected consumers, 64 discussion entries and linked issue context; discussion coverage is complete.
-
Preflight passed. Parser regeneration matched byte for byte; complete protobuf comparison found only ProductL2.ignored field 6. All 74 changed Go files passed parsing and formatting checks.
-
Pinned AWS SDK oracle passed under Go 1.26.6 with -race and transient/permanent controls. Project classification is source-confirmed.
-
Reconciled eight receipts with retained logs; source remains unchanged. Reused applicable prior coverage, frozen-head CI conclusions and attributed author reports.
Limitations:
-
The broader provider probe timed out fetching dependencies twice; neither attempt executed its tests.
-
No local Go 1.27/native product suite, live S3/SQL or GPU execution. Raw CI and author runtime logs were unavailable.
IsRetryableStartupError read only the HTTP status of an object-storage error, so an AWS RequestTimeout (HTTP 400) or Throttling response was classified as permanent and FULLTEXT2 recorded the DATALINK row as ignored. It now also reads the API error code from AWS, MinIO, OSS and COS errors and treats the codes in the AWS SDK's default retryable and throttle sets as transient. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 9137c239da7b30cf4ed6a2658c2bc099d7919ce6
Assessment: approve
The feature coherently reuses existing admission, ignored-row, spill and ISCP owners. Earlier findings are resolved, including AWS RequestTimeout classification; transaction-visible quotas remain the accepted design.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all 89 changed paths, affected consumers, linked issue context and 66 discussion entries; saved complete review and discussion ledgers.
-
Preflight passed. Parser regeneration byte-matched; protobuf comparison confirmed only ProductL2.ignored field 6. All 74 changed Go files passed parsing/formatting; affected CPU/GPU static import checks passed.
-
Exact-source provider component tests passed with -race -count=1 through test-exec, including AWS retryer and permanent-error controls. Eight receipts and retained logs are reconciled in validation-ledger.json; source remains unchanged.
-
Frozen-head CI: 13 successful, 14 skipped and two neutral checks, including build, UT, SCA, coverage and both active multi-CN BVT lanes.
Limitations:
-
The component probe used Go 1.26.6; no local native product suite, SQL/CDC, live cloud or GPU-device execution. Raw CI selections/logs and historical author runtime artifacts were unavailable.
-
The previously accepted raw composite sample-key rendering in synchronous all-bad-build errors remains a nonblocking diagnostic inconsistency.
aunjgr
left a comment
There was a problem hiding this comment.
Independent re-review at 9137c23, following the separately recorded design PASS. The earlier quoted-PK lookup, non-finite integer quantization, fatal-path spill cleanup and oversized ignored-reason findings are resolved. Reasons are now bounded to 1,024 bytes without splitting UTF-8; tests cover large ASCII/multibyte input and public CREATE plus asynchronous sync recording.
I checked the current integration delta, including lossless composite-key hex literals, FULLTEXT2 ignored-table maintenance admission, and typed object-storage retry classification. The documented transaction-snapshot quota and possible concurrent aggregate overshoot remain accepted semantics, not an exact global quota guarantee. No remaining actionable implementation blocker was found.
Evidence reused: current-head successful build, UT, SCA, coverage and both active BVT lanes, with scoped author CPU/race/SQL results. No new local execution is claimed.
Non-blocking description correction: the PR body still describes composite keys as (a, b) and lists the old ENUM-part display limitation. The current code and versioned design instead use lossless X'...' serialized-key literals; align that summary before using it as the commit message.
# Conflicts: # pkg/iscp/index_sqlwriter.go # pkg/pb/pipeline/pipeline.pb.go # pkg/sql/parsers/dialect/mysql/mysql_sql.go # pkg/sql/plan/bind_insert.go
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #31583 (IVF-Flat and FULLTEXT2; completes the issue after #32036)
What this PR does / why we need it:
IVF-Flat and FULLTEXT2 now follow the ignored-rows contract HNSW, CAGRA and IVF-PQ follow (
docs/design/20261028-index-ignored-rows.md):MAX_BAD_RECORDS, the hiddenignoredtable,SHOW INDEX IGNORED/SHOW INDEX STATUS, a permanent stop past the limit, REINDEX restarting it. Before this change one row such an index cannot store failed the build or the statement, and on an asynchronous index stopped every later sync.IVF-Flat (decided by @cpegeric: the check and the recording live in
product_l2; the cast stays in SQL)QUANTIZATIONtype, an int8/uint8 code that is not finite, a squared L2 norm beyond max/4 of the distance type, a NaN or infinite element. One check,ivfflat.Storage, servesproduct_l2, the k-means samples and the search.product_l2leaves out and records such rows in every path that assigns rows to centroids: the build, the async build and its sync, REINDEX, restore, and DML on a synchronous index. The index reaches it as JSON onCENTROIDX(optype, params, config)(the catalog row does not exist yet during CREATE INDEX); only internal SQL may pass that form.MAX_BAD_RECORDS(decided by @cpegeric): within it the row is recorded, past it the statement fails. The count is the one the statement's transaction sees (decided by @cpegeric, 2026-11-04): concurrent transactions may together commit past the limit, by at most the rows each could add; every later statement that records a row then fails until rows are fixed or REINDEX runs. A lock serializing them was rejected (it serializes bad-row DML and adds a lock the DML path does not take). Deleting a row, or updating it to a value the index stores, removes its record, in DML and in the sync.listsseed one NULL centroid, as a table with fewer rows does. A query vector the index cannot store is rejected.FULLTEXT2 (new reason codes, decided by @cpegeric)
jsonparser cannot parse (20351) and a DATALINK that cannot be read (20352: missing stage or file, unsupported url, text that cannot be extracted) are recorded with their message in the new reason column, in the build and the sync. Timeouts, lost connections and unreachable endpoints are retried; a local source for an asynchronous index stays an error, since it is a setting of the table.Keys read as users see them: a composite key as
(a, b), an ENUM key as its member, inSHOW INDEX IGNOREDand in the stop messages. An index created before this change has no ignored table and keeps its SQL; its bad rows now carry the new codes.The design doc gains IVF-Flat and FULLTEXT2 sections and claims I15–I20, each with unit tests and a section of
pessimistic_transaction/vector/vector_ivfflat_ignored.sqlorpessimistic_transaction/fulltext2/fulltext2_ignored.sql.Known limit: an ENUM part of a composite key shows its number in the stop message (
SHOW INDEX IGNOREDshows the member).Validation
-g -n):vector_ivfflat_ignored.sql71/71,fulltext2_ignored.sql31/31;vector3505/3507 (2 ignored),pessimistic_transaction/vector1156/1198 (42 ignored),fulltext21374/1374,pessimistic_transaction/fulltext2passing. Eight existing.resultfiles list the new hiddenignoredtable.stage://ms/missing.txt: file ftdocs/missing.txt is not found.pkg/sql/plan,pkg/sql/compile,pkg/iscp,pkg/sql/colexec/productl2,pkg/sql/colexec/table_function,pkg/vectorindex/...,pkg/fulltext2/...; the new tests pass-race -count=30. golangci-lint: 0 issues.🤖 Generated with Claude Code