Repository navigation
test: replace fulltext2 BVT sleeps with readiness waits - #27598
Conversation
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? |
adda9f3 to
55d22db
Compare
|
Follow-up self-review fixed a coverage weakness in the fast-path EXPLAIN assertion. The prior @regex directives could bypass exact result comparison; the test now uses @metacmp(false), which ignores only unstable JDBC column metadata while still comparing the complete plan row-by-row. Verified both boundaries on the current-main binary: a metadata-only mismatch passed (60/60), a deliberately corrupted Project row failed exactly (59/60), and the restored formal case passed (60/60). The branch is rebased on 705d5fb. |
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [x] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue #25541 ## What this PR does / why we need it: This is a bounded backport of the FULLTEXT2 behavior closure from the fixed `upstream/main` reference to `4.2-dev`. It keeps FULLTEXT2 distinct from classic FULLTEXT and preserves the target branch's parser/PERFORM/pipe contracts. Source/target closure: - source `upstream/main`: `8e616a693458652cc26b3c4be45c6602dff298d4` - target `upstream/4.2-dev`: `d2393868a7aaa6343518d80849fe4696aa3577e9` - exact fork head: `325686d29c17b3729f32b837b5bc2144d33f0a9b` - #25904 core: `966acb2a92bb740e57b0b7a181df2d21956e1d3`, `0eb9a921ece274c956447640b41ad2a255079e8d`, `403a99fb65304e75b82e75793448f0690a871d0e`, `bfa83f42737ca6304c0af3f6913e70ccc961464` - #27165 phrase-position decode: `2b142144c3c24a2100d7d313e952717025d56aeb` - #27171 FT2-only wrapped score/range closure: `835e046faa9242dbe288bd72364a475e2132bbed` - #27461/#27462 cache and cold-load closure: `e4abf5e90d0b5e09590571ca78447e50806527c` - #27598 readiness BVT closure: `e3a7440e2ac32bac780669f33c656960e22cff22` Current-head review repairs: - Reverse constant-left `<`/`<=` before harvesting a lower-bound MATCH membership driver; reject constant-left `>`/`>=` upper bounds fail-closed. - Route all FULLTEXT2 ISCP consumer errors through the non-blocking helper and report `ctx.Err()` on cancellation. - Restore the execution-level `fulltext2_wrapped_score.sql/.result` BVT pair and replace restore/clone fixed sleeps with readiness waits. - Refresh the ancestor-accurate backport manifest and clear all `git diff --check` trailing whitespace findings. - Trim FULLTEXT2 SHOW CREATE option padding only at the terminal output boundary, preserving the shared renderer and vector-index behavior. - Route wrapped-only FULLTEXT2 score predicates on either INNER JOIN child through the existing wrapped rewrite and keep the score comparison in a post-rewrite FILTER. ## Validation - `make -C pkg/sql/parsers/dialect/mysql` — PASS - `make generate-pb` — PASS; protoc 29.3 descriptor-only churn was discarded and no unexpected generated diff remains - `go test -mod=readonly ./pkg/fulltext2/... ./pkg/iscp ./pkg/sql/plan` — PASS - current-head focused `GOWORK=off go test -mod=readonly -count=1 -timeout 120s -run '^TestFulltext2WrappedMatchJoinChild$' ./pkg/sql/plan` — PASS - current-head `GOWORK=off go test -mod=readonly -count=1 ./pkg/sql/plan` — PASS - current-head `GOWORK=off go build -mod=readonly ./pkg/sql/plan` and `GOWORK=off go vet -mod=readonly ./pkg/sql/plan` — PASS - current-head SCA repair — removed the unreferenced `applyJoinFullTextIndices` wrapper; targeted plan tests, build, and vet pass; exact-head remote SCA is pending - current-head focused SHOW CREATE regression and catalog option tests — PASS - local `mo-cgo-test` wrapper — BLOCKED by missing `cgo/libmo.dylib`; no CGo wrapper pass is claimed - `go test -race -mod=readonly ./pkg/fulltext2/... ./pkg/iscp` — PASS - `go build -mod=readonly ./cmd/mo-service` — PASS (macOS linker rpath/path warnings only) - base differential — exact target `d2393868a7aaa6343518d80849fe4696aa3577e9` rejects `CREATE FULLTEXT2 INDEX`; this exact head parses it as `INDEX_CATEGORY_FULLTEXT2` - BVT source parity and no-fixed-sleep scan — PASS - canonical wrapped-score BVT now covers wrapped-only MATCH on both INNER JOIN child positions with qualifying and rejecting thresholds; exact-head remote BVT remains pending - exact-head semantic preflight — `PASS semantic=PASS`, diff hash `efc51153938b14e051372026b296c06e05696385ac674fa7f05f3a7217741d09` ## Scope and acceptance boundaries - `QA required: yes` - The PR was opened as Draft for preflight and is now **Ready for review**. Required CI, formal reviews, and Mergify remain pending; no remote pass is claimed until they bind to this exact head. - Build success, index creation/readiness, and elapsed workload duration are not acceptance by themselves. No classic FULLTEXT result, fixed-commit product acceptance claim, or formal QPS claim is used here. - The 2.3M frozen corpus and shared `freetier-01` workload remain post-merge gates. After merge, only the official immutable image/release workflow may produce the tag/digest; `freetier-01` must be upgraded through the reviewed GitOps `environment=new-dev + mode=mo + action=set` PR. No local image, direct `4.2-dev` push, direct GitOps edit, kubectl mutation, or pod restart is authorized. - The first post-release test is a unique-database 15-minute small-corpus FULLTEXT2 shakeout with readiness polling, token-bucket DML, C1/C10 readers, and an independent correctness ledger. Only `MEASURED_PASS` with zero correctness errors, no backlog, and complete observations may unlock the low-load two-hour continuous run. Please keep issue #25541 open until QA explicitly reports PASS/FAIL. --------- Co-authored-by: Eric Lam <[email protected]> Co-authored-by: XuPeng-SH <[email protected]>
…#27598) ## What - Replace 13 fixed 30s/45s sleeps in six fulltext2 async BVT files with 18 bounded, adaptive readiness checks against the durable `cdc_tail`. - Gate every independent post-create DML on a strict per-index `chunk_id` advance; initial multi-table cases require every table tail to be ready. - Keep MATCH single-shot to avoid pinning a stale per-CN fulltext2 cache. - Keep the covered fast-path EXPLAIN comparison exact, ignoring only unstable JDBC result metadata (`precision` 0 versus -1). ## Coverage and failure behavior - All existing MATCH, INCLUDE, datalink, tenant, position-free, MERGE/REBUILD, error-path, and exact result assertions remain. - Readiness is asserted explicitly instead of inferred from elapsed time. A deterministic negative control (`ready = 0`) timed out and failed as expected; it cannot silently pass without exercising CDC. - EXPLAIN metadata mismatch passes with `@metacmp(false)`, while a deliberately corrupted plan row fails exactly. Extra, missing, or changed plan rows therefore remain detectable. - 28 prepared statements are paired with 28 deallocations. No production code changes. ## Validation - Rebased on current `main`: `705d5fbb625d32090b9a8acadcead08c3e1d9dc3` - Six-file strict run on the preceding main revision: **252/252 passed**, failed 0, abnormal 0; runner cost **175s**, wall **204s** - Same-base before/after (`e866c535`): runner cost **461s -> 196s** (-57.5%); wall **521s -> 241s** (-53.7%) - Three additional complete runs: **252/252** each, runner costs 192s / 180s / 192s - Current-main targeted final run: **60/60 passed**, failed 0, abnormal 0; runner cost **50.582s** - EXPLAIN assertion controls: metadata-only difference **60/60 passed**; corrupted `Project` row **failed as expected (59/60)** - `git diff --check` clean; 18 readiness checks; no fixed sleeps remain in the six files The 120s value is a failure budget, not a delay: polling is every 2s and exits immediately when the durable state advances.
…#27598) ## What - Replace 13 fixed 30s/45s sleeps in six fulltext2 async BVT files with 18 bounded, adaptive readiness checks against the durable `cdc_tail`. - Gate every independent post-create DML on a strict per-index `chunk_id` advance; initial multi-table cases require every table tail to be ready. - Keep MATCH single-shot to avoid pinning a stale per-CN fulltext2 cache. - Keep the covered fast-path EXPLAIN comparison exact, ignoring only unstable JDBC result metadata (`precision` 0 versus -1). ## Coverage and failure behavior - All existing MATCH, INCLUDE, datalink, tenant, position-free, MERGE/REBUILD, error-path, and exact result assertions remain. - Readiness is asserted explicitly instead of inferred from elapsed time. A deterministic negative control (`ready = 0`) timed out and failed as expected; it cannot silently pass without exercising CDC. - EXPLAIN metadata mismatch passes with `@metacmp(false)`, while a deliberately corrupted plan row fails exactly. Extra, missing, or changed plan rows therefore remain detectable. - 28 prepared statements are paired with 28 deallocations. No production code changes. ## Validation - Rebased on current `main`: `705d5fbb625d32090b9a8acadcead08c3e1d9dc3` - Six-file strict run on the preceding main revision: **252/252 passed**, failed 0, abnormal 0; runner cost **175s**, wall **204s** - Same-base before/after (`e866c535`): runner cost **461s -> 196s** (-57.5%); wall **521s -> 241s** (-53.7%) - Three additional complete runs: **252/252** each, runner costs 192s / 180s / 192s - Current-main targeted final run: **60/60 passed**, failed 0, abnormal 0; runner cost **50.582s** - EXPLAIN assertion controls: metadata-only difference **60/60 passed**; corrupted `Project` row **failed as expected (59/60)** - `git diff --check` clean; 18 readiness checks; no fixed sleeps remain in the six files The 120s value is a failure budget, not a delay: polling is every 2s and exits immediately when the durable state advances.
…#27598) ## What - Replace 13 fixed 30s/45s sleeps in six fulltext2 async BVT files with 18 bounded, adaptive readiness checks against the durable `cdc_tail`. - Gate every independent post-create DML on a strict per-index `chunk_id` advance; initial multi-table cases require every table tail to be ready. - Keep MATCH single-shot to avoid pinning a stale per-CN fulltext2 cache. - Keep the covered fast-path EXPLAIN comparison exact, ignoring only unstable JDBC result metadata (`precision` 0 versus -1). ## Coverage and failure behavior - All existing MATCH, INCLUDE, datalink, tenant, position-free, MERGE/REBUILD, error-path, and exact result assertions remain. - Readiness is asserted explicitly instead of inferred from elapsed time. A deterministic negative control (`ready = 0`) timed out and failed as expected; it cannot silently pass without exercising CDC. - EXPLAIN metadata mismatch passes with `@metacmp(false)`, while a deliberately corrupted plan row fails exactly. Extra, missing, or changed plan rows therefore remain detectable. - 28 prepared statements are paired with 28 deallocations. No production code changes. ## Validation - Rebased on current `main`: `705d5fbb625d32090b9a8acadcead08c3e1d9dc3` - Six-file strict run on the preceding main revision: **252/252 passed**, failed 0, abnormal 0; runner cost **175s**, wall **204s** - Same-base before/after (`e866c535`): runner cost **461s -> 196s** (-57.5%); wall **521s -> 241s** (-53.7%) - Three additional complete runs: **252/252** each, runner costs 192s / 180s / 192s - Current-main targeted final run: **60/60 passed**, failed 0, abnormal 0; runner cost **50.582s** - EXPLAIN assertion controls: metadata-only difference **60/60 passed**; corrupted `Project` row **failed as expected (59/60)** - `git diff --check` clean; 18 readiness checks; no fixed sleeps remain in the six files The 120s value is a failure budget, not a delay: polling is every 2s and exits immediately when the durable state advances.
What
cdc_tail.chunk_idadvance; initial multi-table cases require every table tail to be ready.precision0 versus -1).Coverage and failure behavior
ready = 0) timed out and failed as expected; it cannot silently pass without exercising CDC.@metacmp(false), while a deliberately corrupted plan row fails exactly. Extra, missing, or changed plan rows therefore remain detectable.Validation
main:705d5fbb625d32090b9a8acadcead08c3e1d9dc3e866c535): runner cost 461s -> 196s (-57.5%); wall 521s -> 241s (-53.7%)Projectrow failed as expected (59/60)git diff --checkclean; 18 readiness checks; no fixed sleeps remain in the six filesThe 120s value is a failure budget, not a delay: polling is every 2s and exits immediately when the durable state advances.