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

Michael Sun commented on SOLR-9633:
-----------------------------------

The patch looks good to me. One suggestion is to add comments that RAM limit 
feature only works well when the value in cache is an Accountable, such as 
filter cache whose value is a DocSet, which is an Accountable. In case user 
want to use FastLRUCache for other cache, user need to make sure the type of 
value is Accountable.

Another minor general suggestion is to use PriorityQueue in 
markAndSweepByRamSize(), instead of Collection.sort(). It probably doesn't make 
big difference since most cache size is less than 1000 though.

> Limit FastLRUCache by RAM Usage
> -------------------------------
>
>                 Key: SOLR-9633
>                 URL: https://issues.apache.org/jira/browse/SOLR-9633
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Shalin Shekhar Mangar
>             Fix For: master (7.0), 6.4
>
>         Attachments: SOLR-9633.patch
>
>
> SOLR-7372 added a maxRamMB parameter to LRUCache to evict items based on 
> memory usage. That helps with the query result cache but not with the filter 
> cache which defaults to FastLRUCache. This issue intends to add the same 
> feature to FastLRUCache.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to