Repository navigation
test: reduce BVT latency with deterministic readiness checks - #27607
Merged
XuPeng-SH merged 36 commits intoAug 26, 2026
Merged
Conversation
1 of 7 tasks
1 of 7 tasks
XuPeng-SH
added a commit
that referenced
this pull request
Aug 26, 2026
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR relates to: - BVT symptom: #27629 - Production root cause: #27632 - Historical async-update regression: #22794 ## What this PR does / why we need it: This PR is a **BVT-side workaround**, not a production fix for cross-CN HNSW cache invalidation. The original multi-CN HNSW regression deliberately completed all INSERT/DELETE/UPDATE work before the first indexed SELECT. Its comment documented the existing limitation: once a CN loads an HNSW model into memory, CDC publication on another CN may not refresh that cached generation. PR #27607 consolidated the independent initial-build and bulk-delta cases onto the same f32 table. As a result, the consolidated case queried the first 10K generation before loading the second 10K CDC delta. That newly coupled ordering warmed the first-generation model on the query CN. In a multi-CN run, the async consumer could materialize the delta on another CN while the query CN continued serving the cached first generation. The failing jobs therefore returned old-generation neighbor 2638 instead of delta endpoint 19999 for the full 120-second wait window, even after the metadata checksum changed. This change restores the original regression boundary and ordering: - keep the independent first-generation f64 HNSW black-box oracle; - keep the f32 model cache cold until the second 10K CDC load is materialized; - make the delta endpoint probe the first f32 HNSW read; - retain final f32 delta-admission checks for IDs 10000 and 19999; - retain final f32 base-retention checks for IDs 0 and 9999. The core #22794 purpose remains covered: after a parallel bulk delta, the published f32 generation must contain both the original base endpoints and the delta-only endpoints. This PR removes the pre-delta f32 black-box checkpoint that was introduced by the consolidated ordering; it does not claim that the complete historical test matrix is identical, and it does not prove that a warm CN refreshes its cached model. The production contract remains tracked by #27632: a CN that has already loaded an older generation must converge to a newly published generation. Once that production defect is fixed, it needs a dedicated native multi-CN regression that deliberately warms the old model before publishing the new generation. No timeout or retry is increased. No production code is changed. Two pre-delta f32 ANN searches are removed. ### Validation - Verified the SQL and golden command remain synchronized after the rewrite. - Verified no `t2_f32` HNSW read occurs before the second bulk load. - Verified all four final f32 semantic oracles remain in both SQL and golden output. - `git diff --check` passes. A local attempt reused the exact x86_64 `mo-service` artifact from the failing run, but native HNSW crashed under arm64 Docker emulation during the initial model build. That environment-only run is not counted as validation; native x86 multi-CN CI is the relevant execution gate. Failure evidence: - https://github.com/matrixorigin/matrixone/actions/runs/32930733336/job/98063525521 - https://github.com/matrixorigin/matrixone/actions/runs/32926456273/job/98051500919?pr=27621
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…rigin#27607) ## What changed - Replace fixed sleeps with bounded readiness or exact-result waits across async vector/fulltext indexes, statistics, tasks, merge, snapshot, and metadata workflows. - Overlap independent async consumers and consolidate non-orthogonal f32/f64 workflows while retaining separate type, mutation, dimension, and result oracles. - Reduce redundant large-data setup only where the intended planner/runtime path remains asserted explicitly. - Remove duplicate lifecycles and dead closed-issue EXPLAIN placeholders without removing active query-result or stable plan checks. ## Coverage and determinism - HNSW retains f32/f64 type paths; empty-index first-generation INSERT→UPDATE and INSERT→DELETE; snapshot-first CDC insert/update/delete for both types; 128-dimensional first/last endpoints for both types; and an active 20K f32 second-generation transition with delta admission plus base-generation retention oracles. - IVF keeps every narrow type and quantizer oracle. - Spill requires non-zero SpillRows and SpillSize; shuffle keeps stable range/REUSE plan checks and exact query results. Closed issue matrixorigin#19733 raw EXPLAIN placeholders are removed rather than counted as coverage. - Writable external tables retain the MULTICN source plan, multi-object barrier, and exact 100K count/min/max write result. Existing compile/remoterun tests remain the ownership check for remote external-writer reconstruction. - Fulltext/fulltext2 retain independent table/index identities and mutation-generation checks. - Sleep-function coverage remains; only exact duplicate and redundant long-duration calls are removed. - No production code is changed. ## Validation Validated on `[email protected]` against test-owned isolated instances, without waiting for CI: - HNSW async, same instance twice: 78/78 in 52.104s; 78/78 in 47.947s; ignored 0. - Writable external table, isolated two-CN network namespace: 171/171 in 20.355s; then the same two-CN process passed twice consecutively, 171/171 in 18.451s and 171/171 in 18.840s; ignored 0. - Spill: 94/94 in 11.074s; ignored 0. - Shuffle: 77/77 in 6.048s; ignored 0. - Final diff check passes and the PR has no production-code diff. The targeted compile/remoterun Go test could not be rebuilt in the review worktree because its CGo headers were absent and the remote checkout had mismatched vendor/native artifacts; no production workaround or weakened assertion was introduced.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR relates to: - BVT symptom: matrixorigin#27629 - Production root cause: matrixorigin#27632 - Historical async-update regression: matrixorigin#22794 ## What this PR does / why we need it: This PR is a **BVT-side workaround**, not a production fix for cross-CN HNSW cache invalidation. The original multi-CN HNSW regression deliberately completed all INSERT/DELETE/UPDATE work before the first indexed SELECT. Its comment documented the existing limitation: once a CN loads an HNSW model into memory, CDC publication on another CN may not refresh that cached generation. PR matrixorigin#27607 consolidated the independent initial-build and bulk-delta cases onto the same f32 table. As a result, the consolidated case queried the first 10K generation before loading the second 10K CDC delta. That newly coupled ordering warmed the first-generation model on the query CN. In a multi-CN run, the async consumer could materialize the delta on another CN while the query CN continued serving the cached first generation. The failing jobs therefore returned old-generation neighbor 2638 instead of delta endpoint 19999 for the full 120-second wait window, even after the metadata checksum changed. This change restores the original regression boundary and ordering: - keep the independent first-generation f64 HNSW black-box oracle; - keep the f32 model cache cold until the second 10K CDC load is materialized; - make the delta endpoint probe the first f32 HNSW read; - retain final f32 delta-admission checks for IDs 10000 and 19999; - retain final f32 base-retention checks for IDs 0 and 9999. The core matrixorigin#22794 purpose remains covered: after a parallel bulk delta, the published f32 generation must contain both the original base endpoints and the delta-only endpoints. This PR removes the pre-delta f32 black-box checkpoint that was introduced by the consolidated ordering; it does not claim that the complete historical test matrix is identical, and it does not prove that a warm CN refreshes its cached model. The production contract remains tracked by matrixorigin#27632: a CN that has already loaded an older generation must converge to a newly published generation. Once that production defect is fixed, it needs a dedicated native multi-CN regression that deliberately warms the old model before publishing the new generation. No timeout or retry is increased. No production code is changed. Two pre-delta f32 ANN searches are removed. ### Validation - Verified the SQL and golden command remain synchronized after the rewrite. - Verified no `t2_f32` HNSW read occurs before the second bulk load. - Verified all four final f32 semantic oracles remain in both SQL and golden output. - `git diff --check` passes. A local attempt reused the exact x86_64 `mo-service` artifact from the failing run, but native HNSW crashed under arm64 Docker emulation during the initial model build. That environment-only run is not counted as validation; native x86 multi-CN CI is the relevant execution gate. Failure evidence: - https://github.com/matrixorigin/matrixone/actions/runs/32930733336/job/98063525521 - https://github.com/matrixorigin/matrixone/actions/runs/32926456273/job/98051500919?pr=27621
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…rigin#27607) ## What changed - Replace fixed sleeps with bounded readiness or exact-result waits across async vector/fulltext indexes, statistics, tasks, merge, snapshot, and metadata workflows. - Overlap independent async consumers and consolidate non-orthogonal f32/f64 workflows while retaining separate type, mutation, dimension, and result oracles. - Reduce redundant large-data setup only where the intended planner/runtime path remains asserted explicitly. - Remove duplicate lifecycles and dead closed-issue EXPLAIN placeholders without removing active query-result or stable plan checks. ## Coverage and determinism - HNSW retains f32/f64 type paths; empty-index first-generation INSERT→UPDATE and INSERT→DELETE; snapshot-first CDC insert/update/delete for both types; 128-dimensional first/last endpoints for both types; and an active 20K f32 second-generation transition with delta admission plus base-generation retention oracles. - IVF keeps every narrow type and quantizer oracle. - Spill requires non-zero SpillRows and SpillSize; shuffle keeps stable range/REUSE plan checks and exact query results. Closed issue matrixorigin#19733 raw EXPLAIN placeholders are removed rather than counted as coverage. - Writable external tables retain the MULTICN source plan, multi-object barrier, and exact 100K count/min/max write result. Existing compile/remoterun tests remain the ownership check for remote external-writer reconstruction. - Fulltext/fulltext2 retain independent table/index identities and mutation-generation checks. - Sleep-function coverage remains; only exact duplicate and redundant long-duration calls are removed. - No production code is changed. ## Validation Validated on `[email protected]` against test-owned isolated instances, without waiting for CI: - HNSW async, same instance twice: 78/78 in 52.104s; 78/78 in 47.947s; ignored 0. - Writable external table, isolated two-CN network namespace: 171/171 in 20.355s; then the same two-CN process passed twice consecutively, 171/171 in 18.451s and 171/171 in 18.840s; ignored 0. - Spill: 94/94 in 11.074s; ignored 0. - Shuffle: 77/77 in 6.048s; ignored 0. - Final diff check passes and the PR has no production-code diff. The targeted compile/remoterun Go test could not be rebuilt in the review worktree because its CGo headers were absent and the remote checkout had mismatched vendor/native artifacts; no production workaround or weakened assertion was introduced.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR relates to: - BVT symptom: matrixorigin#27629 - Production root cause: matrixorigin#27632 - Historical async-update regression: matrixorigin#22794 ## What this PR does / why we need it: This PR is a **BVT-side workaround**, not a production fix for cross-CN HNSW cache invalidation. The original multi-CN HNSW regression deliberately completed all INSERT/DELETE/UPDATE work before the first indexed SELECT. Its comment documented the existing limitation: once a CN loads an HNSW model into memory, CDC publication on another CN may not refresh that cached generation. PR matrixorigin#27607 consolidated the independent initial-build and bulk-delta cases onto the same f32 table. As a result, the consolidated case queried the first 10K generation before loading the second 10K CDC delta. That newly coupled ordering warmed the first-generation model on the query CN. In a multi-CN run, the async consumer could materialize the delta on another CN while the query CN continued serving the cached first generation. The failing jobs therefore returned old-generation neighbor 2638 instead of delta endpoint 19999 for the full 120-second wait window, even after the metadata checksum changed. This change restores the original regression boundary and ordering: - keep the independent first-generation f64 HNSW black-box oracle; - keep the f32 model cache cold until the second 10K CDC load is materialized; - make the delta endpoint probe the first f32 HNSW read; - retain final f32 delta-admission checks for IDs 10000 and 19999; - retain final f32 base-retention checks for IDs 0 and 9999. The core matrixorigin#22794 purpose remains covered: after a parallel bulk delta, the published f32 generation must contain both the original base endpoints and the delta-only endpoints. This PR removes the pre-delta f32 black-box checkpoint that was introduced by the consolidated ordering; it does not claim that the complete historical test matrix is identical, and it does not prove that a warm CN refreshes its cached model. The production contract remains tracked by matrixorigin#27632: a CN that has already loaded an older generation must converge to a newly published generation. Once that production defect is fixed, it needs a dedicated native multi-CN regression that deliberately warms the old model before publishing the new generation. No timeout or retry is increased. No production code is changed. Two pre-delta f32 ANN searches are removed. ### Validation - Verified the SQL and golden command remain synchronized after the rewrite. - Verified no `t2_f32` HNSW read occurs before the second bulk load. - Verified all four final f32 semantic oracles remain in both SQL and golden output. - `git diff --check` passes. A local attempt reused the exact x86_64 `mo-service` artifact from the failing run, but native HNSW crashed under arm64 Docker emulation during the initial model build. That environment-only run is not counted as validation; native x86 multi-CN CI is the relevant execution gate. Failure evidence: - https://github.com/matrixorigin/matrixone/actions/runs/32930733336/job/98063525521 - https://github.com/matrixorigin/matrixone/actions/runs/32926456273/job/98051500919?pr=27621
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…rigin#27607) ## What changed - Replace fixed sleeps with bounded readiness or exact-result waits across async vector/fulltext indexes, statistics, tasks, merge, snapshot, and metadata workflows. - Overlap independent async consumers and consolidate non-orthogonal f32/f64 workflows while retaining separate type, mutation, dimension, and result oracles. - Reduce redundant large-data setup only where the intended planner/runtime path remains asserted explicitly. - Remove duplicate lifecycles and dead closed-issue EXPLAIN placeholders without removing active query-result or stable plan checks. ## Coverage and determinism - HNSW retains f32/f64 type paths; empty-index first-generation INSERT→UPDATE and INSERT→DELETE; snapshot-first CDC insert/update/delete for both types; 128-dimensional first/last endpoints for both types; and an active 20K f32 second-generation transition with delta admission plus base-generation retention oracles. - IVF keeps every narrow type and quantizer oracle. - Spill requires non-zero SpillRows and SpillSize; shuffle keeps stable range/REUSE plan checks and exact query results. Closed issue matrixorigin#19733 raw EXPLAIN placeholders are removed rather than counted as coverage. - Writable external tables retain the MULTICN source plan, multi-object barrier, and exact 100K count/min/max write result. Existing compile/remoterun tests remain the ownership check for remote external-writer reconstruction. - Fulltext/fulltext2 retain independent table/index identities and mutation-generation checks. - Sleep-function coverage remains; only exact duplicate and redundant long-duration calls are removed. - No production code is changed. ## Validation Validated on `[email protected]` against test-owned isolated instances, without waiting for CI: - HNSW async, same instance twice: 78/78 in 52.104s; 78/78 in 47.947s; ignored 0. - Writable external table, isolated two-CN network namespace: 171/171 in 20.355s; then the same two-CN process passed twice consecutively, 171/171 in 18.451s and 171/171 in 18.840s; ignored 0. - Spill: 94/94 in 11.074s; ignored 0. - Shuffle: 77/77 in 6.048s; ignored 0. - Final diff check passes and the PR has no production-code diff. The targeted compile/remoterun Go test could not be rebuilt in the review worktree because its CGo headers were absent and the remote checkout had mismatched vendor/native artifacts; no production workaround or weakened assertion was introduced.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR relates to: - BVT symptom: matrixorigin#27629 - Production root cause: matrixorigin#27632 - Historical async-update regression: matrixorigin#22794 ## What this PR does / why we need it: This PR is a **BVT-side workaround**, not a production fix for cross-CN HNSW cache invalidation. The original multi-CN HNSW regression deliberately completed all INSERT/DELETE/UPDATE work before the first indexed SELECT. Its comment documented the existing limitation: once a CN loads an HNSW model into memory, CDC publication on another CN may not refresh that cached generation. PR matrixorigin#27607 consolidated the independent initial-build and bulk-delta cases onto the same f32 table. As a result, the consolidated case queried the first 10K generation before loading the second 10K CDC delta. That newly coupled ordering warmed the first-generation model on the query CN. In a multi-CN run, the async consumer could materialize the delta on another CN while the query CN continued serving the cached first generation. The failing jobs therefore returned old-generation neighbor 2638 instead of delta endpoint 19999 for the full 120-second wait window, even after the metadata checksum changed. This change restores the original regression boundary and ordering: - keep the independent first-generation f64 HNSW black-box oracle; - keep the f32 model cache cold until the second 10K CDC load is materialized; - make the delta endpoint probe the first f32 HNSW read; - retain final f32 delta-admission checks for IDs 10000 and 19999; - retain final f32 base-retention checks for IDs 0 and 9999. The core matrixorigin#22794 purpose remains covered: after a parallel bulk delta, the published f32 generation must contain both the original base endpoints and the delta-only endpoints. This PR removes the pre-delta f32 black-box checkpoint that was introduced by the consolidated ordering; it does not claim that the complete historical test matrix is identical, and it does not prove that a warm CN refreshes its cached model. The production contract remains tracked by matrixorigin#27632: a CN that has already loaded an older generation must converge to a newly published generation. Once that production defect is fixed, it needs a dedicated native multi-CN regression that deliberately warms the old model before publishing the new generation. No timeout or retry is increased. No production code is changed. Two pre-delta f32 ANN searches are removed. ### Validation - Verified the SQL and golden command remain synchronized after the rewrite. - Verified no `t2_f32` HNSW read occurs before the second bulk load. - Verified all four final f32 semantic oracles remain in both SQL and golden output. - `git diff --check` passes. A local attempt reused the exact x86_64 `mo-service` artifact from the failing run, but native HNSW crashed under arm64 Docker emulation during the initial model build. That environment-only run is not counted as validation; native x86 multi-CN CI is the relevant execution gate. Failure evidence: - https://github.com/matrixorigin/matrixone/actions/runs/32930733336/job/98063525521 - https://github.com/matrixorigin/matrixone/actions/runs/32926456273/job/98051500919?pr=27621
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Coverage and determinism
Validation
Validated on
[email protected]against test-owned isolated instances, without waiting for CI:The targeted compile/remoterun Go test could not be rebuilt in the review worktree because its CGo headers were absent and the remote checkout had mismatched vendor/native artifacts; no production workaround or weakened assertion was introduced.