Swap the RSSortingVector Implementation - MOD-10714 | MOD-9985#6397
Swap the RSSortingVector Implementation - MOD-10714 | MOD-9985#6397
Conversation
7606fa3 to
cc24b20
Compare
ed9b5e7 to
8549484
Compare
Automated performance analysis summaryThis comment was automatically generated given there is performance data available. In summary:
You can check a comparison in detail via the grafana link Performance Regressions and Issues - Comparison between master and rp-rssortingvector-swap.Time Period from 30 days ago. (environment used: oss-standalone)
Tests with No Significant Changes (31 tests)Tests with No Significant Changes |
f58e355 to
35c8b70
Compare
35c8b70 to
a7430d8
Compare
766bf9e to
9cd12b3
Compare
967a606 to
2a69e42
Compare
2a69e42 to
64b6c71
Compare
331313f to
60611fb
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the C implementation of RSSortingVector with a Rust implementation, swapping out the existing C-based sorting vector functionality for improved performance and memory safety. The change involves replacing header includes, updating function calls, and providing C FFI bindings for the new Rust implementation.
- Removes the old C-based
RSSortingVectorimplementation and replaces it with Rust FFI bindings - Updates all C code to use the new Rust-backed sorting vector functions (
RSSortingVector_New,RSSortingVector_Free, etc.) - Adds necessary constants and forward declarations to support the C-Rust interop
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/spec.h | Updates include from sortable.h to sorting_vector_rs.h |
| src/sortable.h | Removes C struct definition and function declarations, keeps legacy RDB load function |
| src/sortable.c | Removes C implementation functions, keeps normalizeStr and SortingVector_RdbLoad |
| src/redisearch_rs/headers/sorting_vector_rs.h | Adds forward declarations and cleans up function signatures |
| src/redisearch_rs/c_entrypoint/sorting_vector_ffi/src/lib.rs | Implements Rust FFI layer with constants and type definitions |
| src/document.c | Updates function calls from C versions to Rust FFI versions |
| src/debug_commands.c | Replaces direct field access with function calls |
Comments suppressed due to low confidence (1)
src/redisearch_rs/c_entrypoint/sorting_vector_ffi/src/lib.rs:33
- [nitpick] The struct name 'RSSortingVector2' is not descriptive and appears to be a workaround name. Consider using a more meaningful name like 'RSSortingVectorImpl' or 'RSSortingVectorWrapper' to better indicate its purpose as an implementation wrapper.
pub struct RSSortingVector2 {
7dc429a to
2483223
Compare
b900af3 to
c41cdfd
Compare
c41cdfd to
2c110d9
Compare
2c110d9 to
899fb8d
Compare
899fb8d to
a8e28f7
Compare
a378ab2 to
a165736
Compare
a165736 to
116fbff
Compare
|
This pull request is stale because it has been open for 60 days with no activity. |
Describe the changes in the pull request
THIS SWAPS THE C-Implementation with the Rust Implementation of
RSSortingVectorRemoving the old C-Code of
RSSortingVector, and adding refactoring parts of the C code (renaming, direct field access)SortingVector_RdbLoad,normalizeStr)RSValuein Rust.Based on: #6311