Skip to content

LRU enumeration should not return expired/removed items#534

Merged
bitfaster merged 7 commits into
mainfrom
users/alexpeck/filterenum
Dec 9, 2023
Merged

LRU enumeration should not return expired/removed items#534
bitfaster merged 7 commits into
mainfrom
users/alexpeck/filterenum

Conversation

@bitfaster

@bitfaster bitfaster commented Dec 5, 2023

Copy link
Copy Markdown
Owner

This fixes a small gap, and introduces an observability difference because TLRU tests previously used to the count to observe eviction. To fix this:

  • Remove the abstract base class used for TLRU tests - this is no longer needed since introducing Duration and having a single implementation of TLruLongTicksPolicy.
  • Change the tests to use ConcurrentTLru, and verify expiry via the internal queue counters which are part of the public API.

@coveralls

coveralls commented Dec 5, 2023

Copy link
Copy Markdown

Coverage Status

coverage: 99.106% (-0.2%) from 99.28%
when pulling 37ad62c on users/alexpeck/filterenum
into 6339ed9 on main.

Comment thread BitFaster.Caching/Lfu/ConcurrentLfuCore.cs Outdated
@bitfaster bitfaster marked this pull request as ready for review December 9, 2023 20:29
@bitfaster bitfaster changed the title Cache enumeration should not return expired/removed items LRU enumeration should not return expired/removed items Dec 9, 2023
@bitfaster bitfaster merged commit ef211dd into main Dec 9, 2023
@bitfaster bitfaster deleted the users/alexpeck/filterenum branch December 9, 2023 21:10
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.

2 participants