[8.4] MOD-12234: Fix totalDocsLen updates#7261
Merged
redisearch-backport-pull-request[bot] merged 2 commits into8.4from Nov 9, 2025
Merged
[8.4] MOD-12234: Fix totalDocsLen updates#7261redisearch-backport-pull-request[bot] merged 2 commits into8.4from
redisearch-backport-pull-request[bot] merged 2 commits into8.4from
Conversation
* 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)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.4 #7261 +/- ##
==========================================
- Coverage 85.65% 85.63% -0.03%
==========================================
Files 326 326
Lines 50943 50942 -1
Branches 10921 10921
==========================================
- Hits 43635 43623 -12
- Misses 7141 7153 +12
+ Partials 167 166 -1
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:
|
oshadmi
approved these changes
Nov 9, 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.
Description
Backport of #7227 to
8.4.Note
Fix document length stats by switching deletes/replaces to DocTable_Pop with proper numDocuments/totalDocsLen adjustments, removing oldMd usage, and updating tests accordingly.
DocTable_DeletewithDocTable_Popinindexer.c,redisearch_api.c, andspec.c, updatingnumDocumentsandtotalDocsLenand callingDMD_Return.RSAddDocumentCtx.oldMdand its cleanup; adjust replace path to release popped DMD.DocTable_Pop.DocTable_Pop.Written by Cursor Bugbot for commit 9e427e2. This will update automatically on new commits. Configure here.