Reimplement keys to not depend on put_range_in_cache#6919
Merged
HaoranYi merged 4 commits intoanza-xyz:masterfrom Jul 14, 2025
Merged
Reimplement keys to not depend on put_range_in_cache#6919HaoranYi merged 4 commits intoanza-xyz:masterfrom
HaoranYi merged 4 commits intoanza-xyz:masterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6919 +/- ##
=======================================
Coverage 83.2% 83.2%
=======================================
Files 856 856
Lines 376863 376869 +6
=======================================
+ Hits 313749 313773 +24
+ Misses 63114 63096 -18 🚀 New features to boost your workflow:
|
4fa55ec to
5c228c0
Compare
| if let Some(disk) = self.bucket.as_ref() { | ||
| for key in disk.keys() { | ||
| if !map.contains_key(&key) { | ||
| keys.insert(key); |
There was a problem hiding this comment.
just do insert. doesn't hurt to insert it again.
| } | ||
| } | ||
| } | ||
| drop(map); |
There was a problem hiding this comment.
i'd put this drop above after we get keys from map. we don't need to hold it open. This was always a lossy operation.
brooksprumo
reviewed
Jul 12, 2025
Co-authored-by: Brooks <brooks@prumo.org>
Co-authored-by: Brooks <brooks@prumo.org>
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.
Problem
put_range_in_cache was originally introduced to support rent scanning by keeping certain key ranges in memory. However, since we no longer perform range-based rent scanning, this mechanism is now obsolete.
This PR refactors the keys() to stop relying on put_range_in_cache. With this change, there are no remaining dependencies on put_range_in_cache in the index scan path.
This lays the groundwork for a future PR (#6920) to fully remove hold_range_in_memory from the codebase.
Summary of Changes
reimplement keys to not use put_range_in_cache.
Summary of Changes
Fixes #