[MOD-9998] Migrate RSIndexResult to Rust#6301
Merged
Conversation
This is the last step to be able to more easily migrate the inverted index to Rust too.
34c46ea to
2fd3627
Compare
RSIndexResult to RustRSIndexResult to Rust
zeenix
reviewed
Jun 11, 2025
Contributor
zeenix
left a comment
There was a problem hiding this comment.
Other than that, the only concern is that it ended up a very disruptive change on the C side and this PR/commit ends up really big (compared to the actual change) but I guess that can't be helped.
alonre24
reviewed
Jun 12, 2025
alonre24
previously approved these changes
Jun 12, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6301 +/- ##
==========================================
- Coverage 88.85% 88.75% -0.11%
==========================================
Files 240 243 +3
Lines 40524 40893 +369
Branches 3165 3483 +318
==========================================
+ Hits 36007 36293 +286
- Misses 4482 4557 +75
- Partials 35 43 +8
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:
|
The problem with copy on raw pointers is that we might end up with multiple mutable references to the raw types or just mixed mutable and immutable references. This is obviously a memory / data race concert which we don't want.
Remove things which are no longer needed.
LukeMathWalker
approved these changes
Jun 17, 2025
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.
Describe the changes in the pull request
This PR moves the
RSIndexResultstruct to be defined in Rust. This is the last step to be able to more easily migrate the inverted index to Rust too.This only differs to the C type in that the anonymous "data" union field now has a name. This required updating all the C files.
pack(16)
The original C had a
pack(16)attribute which no longer exists with this. Thecbindgenwe are using does not supportpacked(N). I also wrote tests to ensure the Rust implementation has the exact same size and field offsets of the original C definitions before removing the C definitions.Mark if applicable