[MOD-13847] Swap C numeric range tree with Rust implementation#8306
[MOD-13847] Swap C numeric range tree with Rust implementation#8306LukeMathWalker merged 9 commits intomasterfrom
Conversation
5ab7173 to
a95aa68
Compare
69d255a to
2d66944
Compare
a95aa68 to
b514f01
Compare
|
❌ The last analysis has failed. |
b514f01 to
c629c5b
Compare
2d66944 to
1fa3b06
Compare
c629c5b to
5c61e20
Compare
4f38267 to
e873c7f
Compare
151e4d1 to
d9136d3
Compare
e873c7f to
0aa6d28
Compare
d9136d3 to
609478b
Compare
0aa6d28 to
5ec972a
Compare
609478b to
ba9c5b1
Compare
5ec972a to
5de5df1
Compare
ba9c5b1 to
d93c532
Compare
5de5df1 to
494fed2
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8306 +/- ##
==========================================
- Coverage 82.89% 82.38% -0.52%
==========================================
Files 433 440 +7
Lines 60961 60839 -122
Branches 18662 18998 +336
==========================================
- Hits 50535 50122 -413
- Misses 10239 10528 +289
- Partials 187 189 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
494fed2 to
4c0ce4b
Compare
d93c532 to
a75af40
Compare
a75af40 to
7c2bdfb
Compare
22864e6 to
2c7647d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| /// Resolve a [`NodeIndex`] to a mutable reference to the node. | ||
| pub fn node_mut(&mut self, idx: NodeIndex) -> &mut NumericRangeNode { | ||
| &mut self.nodes[idx] | ||
| } |
There was a problem hiding this comment.
Public node_mut lacks feature gate unlike range_mut
Low Severity
The new node_mut method is unconditionally pub, but it's only used externally in test code (rqe_iterators_test_utils). The companion range_mut method on NumericRangeNode was deliberately feature-gated behind test-utils (as requested in PR discussion), with pub(crate) in production and pub for tests. node_mut exposes mutable access to arbitrary tree nodes without the same gating, making the internal tree structure unnecessarily accessible to downstream crates in production builds.
Additional Locations (1)
Update the C fork_gc module to use the new streaming numeric GC scanner API instead of buffering deltas.
2c7647d to
4bfc792
Compare
|
If I have to fix conflicts one more time... 😭 |
|




Describe the changes in the pull request
Replace the existing C implementation with the Rust one.
Stacked on #8401.
Which additional issues this PR fixes
Main objects this PR modified
Mark if applicable
Release Notes
If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.
Note
High Risk
High risk because it swaps the core numeric/geo indexing data structure, iterator creation, and ForkGC apply/compaction paths, which can affect query correctness, memory accounting, and GC safety under concurrency.
Overview
Replaces the C
NumericRangeTreeimplementation with the Rust-backed FFI version across indexing, querying, debug commands, memory accounting, and garbage collection.Numeric query execution now asks Rust to both find matching ranges and build per-range iterators via new
CreateNumericRangeIterators, andForkGCnow streams per-node GC entries from the child and applies them in the parent withNumericRangeTree_ApplyGcEntry, followed byNumericRangeTree_CompactIfSparseinstead of the previous empty-leaf trimming logic.Updates tests and debug outputs to match the new tree structure/ordering and memory sizing (
NumericRangeTree_BaseSize,NumericRangeTree_GetInvertedIndexesSize), and removes the old C++ numeric range tree test suite (test_cpp_range.cpp).Written by Cursor Bugbot for commit 4bfc792. This will update automatically on new commits. Configure here.