[ 
https://issues.apache.org/jira/browse/CASSANDRA-11452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15240856#comment-15240856
 ] 

Benedict commented on CASSANDRA-11452:
--------------------------------------

The simplest way would be to accept a hash function that at least operates over 
long values, which if not provided just returns the int, or possibly {{int | 
((long)int << 32)}}.  It would be nice if we could operate over larger values, 
but I don't think that's possible without negatively impacting Caffeine's 
footprint.

We can also protect against the attack by simply comparing against a random 
member of the LRU for frequency in the LFU on admission, perhaps preferring 
(exponentially) candidates that are near to eviction, i.e. generating a number 
via an extreme value/exponential/zipf RNF and walking this distance from the 
head of the eviction queue.  This at least provides a mechanism that will 
rapidly prune collisions without affecting behaviour meaningfully.


> 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)

Reply via email to