[
https://issues.apache.org/jira/browse/SOLR-9284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15437301#comment-15437301
]
Michael Sun commented on SOLR-9284:
-----------------------------------
bq. It never had a removal listener. This is the names map mentioned above. We
can't easily remove names, that is the point of just setting an upper size on
it.
I understand this patch doesn't want to remove names. However the Caffeine
cache may decide to remove a name on his own. It's the case even the map didn't
reach the max size. Therefore removing can happen under the hood anytime. A
removal listener is necessary if Caffeine cache is used. Here is the doc of
maximumSize() which explains the behavior
https://github.com/ben-manes/caffeine/blob/master/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java#L277.
If names are not intended to be removed, it's probably better to use
ConcurrentHashMap. I think the growth of name map is less critical compared to
the growth of BlockKey. There seems no evidence in test so far that name map
grows significantly to be on the radar either.
> The HDFS BlockDirectoryCache should not let it's keysToRelease or names maps
> grow indefinitely.
> -----------------------------------------------------------------------------------------------
>
> Key: SOLR-9284
> URL: https://issues.apache.org/jira/browse/SOLR-9284
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: hdfs
> Reporter: Mark Miller
> Assignee: Mark Miller
> Fix For: 6.2, master (7.0)
>
> Attachments: SOLR-9284.patch, SOLR-9284.patch
>
>
> https://issues.apache.org/jira/browse/SOLR-9284
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]