Skip to content
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

RFC: Completely remove the option of a zero-sized block cache #1770

Closed
wants to merge 1 commit into from
Closed

RFC: Completely remove the option of a zero-sized block cache #1770

wants to merge 1 commit into from

Conversation

adamreichold
Copy link
Collaborator

This was discussed in #1755 (comment) and would simplify the cache implementation at the cost of some scattered changes around the code base and the requirement to at least use cache size one everywhere.

@codecov-commenter
Copy link

Codecov Report

Merging #1770 (1d0fbf4) into main (7a8fce0) will decrease coverage by 0.02%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##             main    #1770      +/-   ##
==========================================
- Coverage   94.12%   94.09%   -0.03%     
==========================================
  Files         282      282              
  Lines       52908    52910       +2     
==========================================
- Hits        49798    49788      -10     
- Misses       3110     3122      +12     
Impacted Files Coverage Δ
src/functional_test.rs 0.00% <0.00%> (ø)
src/reader/mod.rs 91.25% <33.33%> (-1.75%) ⬇️
src/core/searcher.rs 78.37% <100.00%> (ø)
src/core/segment_reader.rs 90.80% <100.00%> (+0.03%) ⬆️
src/indexer/merger.rs 98.84% <100.00%> (ø)
src/indexer/segment_writer.rs 97.71% <100.00%> (+0.01%) ⬆️
src/store/mod.rs 99.23% <100.00%> (+<0.01%) ⬆️
src/store/reader.rs 79.91% <100.00%> (-0.71%) ⬇️
sstable/src/block_reader.rs 73.77% <0.00%> (-1.64%) ⬇️
src/indexer/segment_updater.rs 94.40% <0.00%> (-1.05%) ⬇️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@PSeitz
Copy link
Contributor

PSeitz commented Jan 11, 2023

I think the NonZero API is worse than before. Disabling the cache is a valid use case (e.g. in very resource constrained environments or for tests). I created a ticket here: jeromefroe/lru-rs#165

@adamreichold
Copy link
Collaborator Author

I think the NonZero API is worse than before. Disabling the cache is a valid use case (e.g. in very resource constrained environments or for tests). I created a ticket here: jeromefroe/lru-rs#165

Yes, I agree. Let's drop this and remove the Option layer when lru is bumped to something supporting zero-capacity caches again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants