Repository navigation
Conversation
wombatu-kun
force-pushed
the
issue/10847-bloomfilter-distributed-optimize
branch
from
November 15, 2026 01:46
a222928 to
5105afd
Compare
…d update The test only planned the bounded optimize and then ran the default one. Execute and commit the bounded plan, and assert the coverage it leaves, the updated value, the deleted copy it filters out, and the IS NULL answers.
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The earlier stale-null finding remains fixed. The bounded path also preserves updated values and exact null answers after a stable-row-ID update. No remaining blockers found.
Xuanwo
added a commit
that referenced
this pull request
Nov 16, 2026
The `test_create_ivf_hnsw_pq` fixture is stochastic: its live index build samples four IVF training rows and initializes the IVF and PQ k-means models from OS entropy. Recall is therefore a random variable, and the existing `recall >= 0.5` assertion occasionally sees `0.45`. The same test failed with that signature on ARM in #10977 and on x86 in #10716; the test, training and lockfile inputs are identical at those heads, their bases and current `main`. This is a test-only change. The test now trains the IVF model from four fixed rows of the same fixture with `train_ivf_model_from_sample`, trains the PQ codebook on the corresponding residuals with `PQBuildParams::build`, and passes both models to `create_index`. The live build therefore no longer consumes training entropy, while the index parameters (`nlist=2`, `sample_rate=2`, `max_iters=2`, PQ 4x8, HNSW 3/8/32), the query (`k=20`, `nprobes=2`, `ef=64`), the `recall >= 0.5` threshold, ground truth, HNSW construction, PQ encoding and scan path are unchanged. Training coverage is retained: both production trainers execute in this test, and their independent exact-output tests remain (`vector::kmeans::tests::test_flat_kmeans_seed_is_reproducible`, `vector::pq::builder::tests`, and the `train_ivf_from_sample_*` cases). Validation: - Before: 15 independent-process runs passed with instrumented recall 0.60-0.85; the `0.45` CI tail was not reproduced locally, matching the prior 200-run measurement. - After: 10 independent-process runs of the fixed-model fixture produced identical results with recall 0.80; the final test code passed 15/15 unmodified runs (5 before and 10 after the temporary recall print was removed). - Neighbor tests: IVF/HNSW/PQ lifecycle cases, `test_create_index_nulls`, PQ builder and seeded-kmeans tests passed. - `cargo fmt --all -- --check` - `cargo clippy --all --tests --benches --profile ci --locked --features "$ALL_FEATURES" -- -D warnings` Limits: the failing CI run did not log its sampled rows or initial centroids, so the exact draw cannot be replayed. ARM was not run locally; the hosted Rust ARM job on this PR is the platform check. Refs #8764
Xuanwo
approved these changes
Nov 16, 2026
4 of 7 tasks
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.
Part of #10847.
A bounded
optimize_indices(max_rows_per_task/max_rows_per_segment) now splits a BloomFilter index into tasks and merges its segments by their zones; before, the whole index stayed in one task, and the single-processmerge(N >= 2)rebuilt the segments by rescanning the column. The newmerge_bloomfilter_indices_with_new_data, next to the unchangedmerge_bloomfilter_indices, keeps each segment's zones and null rows over its live fragments and trains zones for the new rows with the trainerupdateuses.merge_scalar_indicestakes this path for two or more segments, and the planner adds BloomFilter tosegment_has_merge_primitive.Segments merge by zones only when each records its null rows and shares the build parameters (read from the file metadata without loading zones), when none holds zones of a fragment that an in-place column rewrite took out of its coverage (read from the zones' fragment ids, including fragments a deferred compaction has since moved), and when the table has no tagged fragment reuse history, no compaction remap pending on them and no segment in a shallow clone's base; otherwise the index stays one task, as before.
Out of scope, since
mainhas them too: #10986 (the default optimize keeps a rewritten fragment's old null rows throughupdate) and #10987 (a segment outside the merge keeps answering for a rewritten fragment once another segment indexes it). This PR is independent of #10884 (MinHashLSH): both touchsegment_has_merge_primitiveand the module docs, so whichever lands second rebases mechanically.