[ https://issues.apache.org/jira/browse/CASSANDRA-11452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15244411#comment-15244411 ]
Benedict commented on CASSANDRA-11452: -------------------------------------- bq. Sadly Ehcache3 did this for their randomly sampled LRU Ah, but they were _evicting_ a random sample: here we only want to randomly admit, and since we're protecting from a biased sample of too high a threshold, and we're looking for (thereabouts) the _lowest_ frequency in the map, we shouldn't ever negatively impact performance, only possibly be slightly slow to respond to these attacks. With an Iterator we'd eventually visit the entire map too, so we'd be absolutely guaranteed to be robust. That doesn't take away from what I said though: we're almost certainly achieving as much robustness as we need, and the algorithm you sketched there looks fine to me. > Cache implementation using LIRS eviction for in-process page cache > ------------------------------------------------------------------ > > Key: CASSANDRA-11452 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11452 > Project: Cassandra > Issue Type: Improvement > Components: Local Write-Read Paths > Reporter: Branimir Lambov > Assignee: Branimir Lambov > > Following up from CASSANDRA-5863, to make best use of caching and to avoid > having to explicitly marking compaction accesses as non-cacheable, we need a > cache implementation that uses an eviction algorithm that can better handle > non-recurring accesses. -- This message was sent by Atlassian JIRA (v6.3.4#6332)