-
Notifications
You must be signed in to change notification settings - Fork 590
Reimplement keys to not depend on put_range_in_cache #6919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do insert. doesn't hurt to insert it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
} | ||
} | ||
} | ||
drop(map); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
Co-authored-by: Brooks <[email protected]>
Co-authored-by: Brooks <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 #