Conversation
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 switch_to_rust_ii.Time Period from 30 days ago. (environment used: oss-standalone)
Tests with No Significant Changes (17 tests)Tests with No Significant Changes
|
4ec20de to
5ef14b6
Compare
| } | ||
|
|
||
| // Test Revalidate returns VALIDATE_MOVED when the lastDocId was deleted from the index | ||
| TEST_P(InvIndIteratorRevalidateTest, RevalidateAfterDocumentDeleted) { |
There was a problem hiding this comment.
This test is quite useful. Why is it being removed?
There was a problem hiding this comment.
This test requires getting a mutable reference to the inverted index from the index reader. The Rust index reader only holds a borrowed reference to the inverted index. So I can't implement the FFI needed for this test.
There was a problem hiding this comment.
@alonre24 This is testing an iterator. So there is not an equivalent Rust tests for it (the Rust iterators does have this kind of test but that code is not in production yet)
There was a problem hiding this comment.
My problem is things like line 1020 which tries to mutate an index while it will only have *const access to it
There was a problem hiding this comment.
These are the Rust iterator tests we have for revalidation
96c78b6 to
cf95f76
Compare
2301498 to
96ab134
Compare
90b53ab to
049a70c
Compare
049a70c to
5d64b7d
Compare
673cb3e to
c2a88e6
Compare
5c05b42 to
c91a117
Compare
|
Not a blocker for this branch, but can't we now remove |
We can definitely do that as a cleanup tasks after this is merged |
af78c1f to
9fd6f6e
Compare
This test requires a mutable access to the inverted index in a reader and direct access to the repair block call. Both of these are not possible so the test is removed.
The text inverted indices expect to have a field mask filter, not the `None` case.
It is now possible to have an inverted index with no blocks in it.
9c12416 to
1b6baac
Compare
* Switch to Rust inverted index * Remove encoder and decoder getter usage It is no longer possible to get the encoders or decoders from the flags. Instead they are coupled to the inverted index or its reader. * Update `testNumericInverted` * Update testIndexFlags * Don't check buffer growth in test There is no reason for the test to check the internals of these structures. * Fix size test on flags * Fix size test for numeric index * Fix size test for tag index * Fix sizes on LLapi * Update fork tests to const * C GC updates * Update fork tests * Don't free deltas twice * Fix sizes in Python tests * Recreate index to have compression turned on * Remove impossible test This test requires a mutable access to the inverted index in a reader and direct access to the repair block call. Both of these are not possible so the test is removed. * Remove C benchmarks * Move header out of future * Remove from iterator benches * Fix symbols for GC benchmark * Update iterator benchmark FFI * Get num_entries on index directly * Trim bench dependencies * Fix filters in CPP tests The text inverted indices expect to have a field mask filter, not the `None` case. * Update debug assertions It is now possible to have an inverted index with no blocks in it.
* Fix BM25STD underflow wraparound * Fix comment * Fix documentation and tweak test * Address review * Remove old test * Skip cluster on expiration test * Fix leak in test * Switch to rust ii (#6958) * Switch to Rust inverted index * Remove encoder and decoder getter usage It is no longer possible to get the encoders or decoders from the flags. Instead they are coupled to the inverted index or its reader. * Update `testNumericInverted` * Update testIndexFlags * Don't check buffer growth in test There is no reason for the test to check the internals of these structures. * Fix size test on flags * Fix size test for numeric index * Fix size test for tag index * Fix sizes on LLapi * Update fork tests to const * C GC updates * Update fork tests * Don't free deltas twice * Fix sizes in Python tests * Recreate index to have compression turned on * Remove impossible test This test requires a mutable access to the inverted index in a reader and direct access to the repair block call. Both of these are not possible so the test is removed. * Remove C benchmarks * Move header out of future * Remove from iterator benches * Fix symbols for GC benchmark * Update iterator benchmark FFI * Get num_entries on index directly * Trim bench dependencies * Fix filters in CPP tests The text inverted indices expect to have a field mask filter, not the `None` case. * Update debug assertions It is now possible to have an inverted index with no blocks in it. * Partially fix totalDocLen metric * Fix * Make test not pass by accident * Remove var * Update totalDocLen on deletions as well * Fix tests * Fix assertions * Clean up unused old dmd * Add assertions to llapi * Remove Delete API * Skip unnecesary cluster tests --------- Co-authored-by: Pieter <[email protected]>
* Fix BM25STD underflow wraparound * Fix comment * Fix documentation and tweak test * Address review * Remove old test * Skip cluster on expiration test * Fix leak in test * Switch to rust ii (#6958) * Switch to Rust inverted index * Remove encoder and decoder getter usage It is no longer possible to get the encoders or decoders from the flags. Instead they are coupled to the inverted index or its reader. * Update `testNumericInverted` * Update testIndexFlags * Don't check buffer growth in test There is no reason for the test to check the internals of these structures. * Fix size test on flags * Fix size test for numeric index * Fix size test for tag index * Fix sizes on LLapi * Update fork tests to const * C GC updates * Update fork tests * Don't free deltas twice * Fix sizes in Python tests * Recreate index to have compression turned on * Remove impossible test This test requires a mutable access to the inverted index in a reader and direct access to the repair block call. Both of these are not possible so the test is removed. * Remove C benchmarks * Move header out of future * Remove from iterator benches * Fix symbols for GC benchmark * Update iterator benchmark FFI * Get num_entries on index directly * Trim bench dependencies * Fix filters in CPP tests The text inverted indices expect to have a field mask filter, not the `None` case. * Update debug assertions It is now possible to have an inverted index with no blocks in it. * Partially fix totalDocLen metric * Fix * Make test not pass by accident * Remove var * Update totalDocLen on deletions as well * Fix tests * Fix assertions * Clean up unused old dmd * Add assertions to llapi * Remove Delete API * Skip unnecesary cluster tests --------- Co-authored-by: Pieter <[email protected]> (cherry picked from commit 25e65ef)
* MOD-12234: Fix totalDocsLen updates (#7227) * Fix BM25STD underflow wraparound * Fix comment * Fix documentation and tweak test * Address review * Remove old test * Skip cluster on expiration test * Fix leak in test * Switch to rust ii (#6958) * Switch to Rust inverted index * Remove encoder and decoder getter usage It is no longer possible to get the encoders or decoders from the flags. Instead they are coupled to the inverted index or its reader. * Update `testNumericInverted` * Update testIndexFlags * Don't check buffer growth in test There is no reason for the test to check the internals of these structures. * Fix size test on flags * Fix size test for numeric index * Fix size test for tag index * Fix sizes on LLapi * Update fork tests to const * C GC updates * Update fork tests * Don't free deltas twice * Fix sizes in Python tests * Recreate index to have compression turned on * Remove impossible test This test requires a mutable access to the inverted index in a reader and direct access to the repair block call. Both of these are not possible so the test is removed. * Remove C benchmarks * Move header out of future * Remove from iterator benches * Fix symbols for GC benchmark * Update iterator benchmark FFI * Get num_entries on index directly * Trim bench dependencies * Fix filters in CPP tests The text inverted indices expect to have a field mask filter, not the `None` case. * Update debug assertions It is now possible to have an inverted index with no blocks in it. * Partially fix totalDocLen metric * Fix * Make test not pass by accident * Remove var * Update totalDocLen on deletions as well * Fix tests * Fix assertions * Clean up unused old dmd * Add assertions to llapi * Remove Delete API * Skip unnecesary cluster tests --------- Co-authored-by: Pieter <[email protected]> (cherry picked from commit 25e65ef) * Remove unrelated diffs --------- Co-authored-by: Raz Monsonego <[email protected]> Co-authored-by: Pieter <[email protected]>
* Fix BM25STD underflow wraparound * Fix comment * Fix documentation and tweak test * Address review * Remove old test * Skip cluster on expiration test * Fix leak in test * Switch to rust ii (#6958) * Switch to Rust inverted index * Remove encoder and decoder getter usage It is no longer possible to get the encoders or decoders from the flags. Instead they are coupled to the inverted index or its reader. * Update `testNumericInverted` * Update testIndexFlags * Don't check buffer growth in test There is no reason for the test to check the internals of these structures. * Fix size test on flags * Fix size test for numeric index * Fix size test for tag index * Fix sizes on LLapi * Update fork tests to const * C GC updates * Update fork tests * Don't free deltas twice * Fix sizes in Python tests * Recreate index to have compression turned on * Remove impossible test This test requires a mutable access to the inverted index in a reader and direct access to the repair block call. Both of these are not possible so the test is removed. * Remove C benchmarks * Move header out of future * Remove from iterator benches * Fix symbols for GC benchmark * Update iterator benchmark FFI * Get num_entries on index directly * Trim bench dependencies * Fix filters in CPP tests The text inverted indices expect to have a field mask filter, not the `None` case. * Update debug assertions It is now possible to have an inverted index with no blocks in it. * Partially fix totalDocLen metric * Fix * Make test not pass by accident * Remove var * Update totalDocLen on deletions as well * Fix tests * Fix assertions * Clean up unused old dmd * Add assertions to llapi * Remove Delete API * Skip unnecesary cluster tests --------- Co-authored-by: Pieter <[email protected]>
MOD-12234: Fix totalDocsLen updates (#7227) * Fix BM25STD underflow wraparound * Fix comment * Fix documentation and tweak test * Address review * Remove old test * Skip cluster on expiration test * Fix leak in test * Switch to rust ii (#6958) * Switch to Rust inverted index * Remove encoder and decoder getter usage It is no longer possible to get the encoders or decoders from the flags. Instead they are coupled to the inverted index or its reader. * Update `testNumericInverted` * Update testIndexFlags * Don't check buffer growth in test There is no reason for the test to check the internals of these structures. * Fix size test on flags * Fix size test for numeric index * Fix size test for tag index * Fix sizes on LLapi * Update fork tests to const * C GC updates * Update fork tests * Don't free deltas twice * Fix sizes in Python tests * Recreate index to have compression turned on * Remove impossible test This test requires a mutable access to the inverted index in a reader and direct access to the repair block call. Both of these are not possible so the test is removed. * Remove C benchmarks * Move header out of future * Remove from iterator benches * Fix symbols for GC benchmark * Update iterator benchmark FFI * Get num_entries on index directly * Trim bench dependencies * Fix filters in CPP tests The text inverted indices expect to have a field mask filter, not the `None` case. * Update debug assertions It is now possible to have an inverted index with no blocks in it. * Partially fix totalDocLen metric * Fix * Make test not pass by accident * Remove var * Update totalDocLen on deletions as well * Fix tests * Fix assertions * Clean up unused old dmd * Add assertions to llapi * Remove Delete API * Skip unnecesary cluster tests --------- Co-authored-by: Pieter <[email protected]>
Describe the changes in the pull request
Switch inverted index implementation to use the Rust impl. The C benchmarks are also removed since the static library for the C inverted index is no longer compiled with this change.
NOTE
This PR changes the behaviour around turning numeric compression on / off. The old C code used to implement this change immediately all new and existing numeric inverted indices. This is not the case with the Rust code. For the Rust code it will only take effect for new indices. Existing indices have to be dropped and recreated to have the config change. See this commit for an example: 97678be
Post work
After this merge is done, we should complete RED-175099 to recover the memory increase.
Mark if applicable
Note
Switch to the Rust inverted index, update GC/iterator APIs and FFI, remove C benches, and align tests/memory expectations with the new implementation.
inverted_indexwith Rust implementation; removesrc/inverted_indexfrom build/link and include paths.redisearchtarget links; dropinverted_indexobject.InvertedIndex_GcDelta_Read/Free/Apply) and stats fields (entries_removed/bytes_freed/bytes_allocated/blocks_ignored).IndexRepairParamsfield names; passblockCounttoInvertedIndex_BlocksSummaryFree.const IndexBlock *refs; adjust HLL/cardinality reset logic and block index math.num_entries.inverted_index_ffi; update build to generate headers fromheaders/inverted_index.h.NewInvertedIndex_Exin benchers; wire throughredisearch_rsre-exports.Written by Cursor Bugbot for commit 1b6baac. This will update automatically on new commits. Configure here.