Repository navigation
test: avoid stale HNSW cache in multi-CN BVT - #27631
Merged
Merged
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? |
XuPeng-SH
force-pushed
the
fix/hnsw-bvt-cross-cn-cache
branch
from
August 26, 2026 06:24
5e3104b to
e8919b6
Compare
XuPeng-SH
force-pushed
the
fix/hnsw-bvt-cross-cn-cache
branch
from
August 26, 2026 06:26
e8919b6 to
a83b1eb
Compare
1 task done
1 of 7 tasks
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
## 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
## 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 type of PR is this?
Which issue(s) this PR relates to:
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:
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
t2_f32HNSW read occurs before the second bulk load.git diff --checkpasses.A local attempt reused the exact x86_64
mo-serviceartifact 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: