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

Ben Manes commented on SOLR-15555:
----------------------------------

This looks similar to an {{AsyncCache}}, which stores a {{CompletableFuture}} 
as the map's value. This way there is a mapping established immediately and 
other callers receive an in-flight future. Is your FutureDocSet an asynchronous 
task that might be converted to a Java future instead?

{{AsyncCache}} makes a few tweaks for the desired behavior. While the future is 
in-flight it disables size and expiration for that entry and registers a 
{{whenComplete}} callback to update the entry's metadata and record the load 
time. If the future fails or resolves to {{null}} then the callback will remove 
the entry. You might want to make similar adjustments to toggle the cache's 
behavior.

> Use filterCache.computeIfAbsent in SolrIndexSearcher
> ----------------------------------------------------
>
>                 Key: SOLR-15555
>                 URL: https://issues.apache.org/jira/browse/SOLR-15555
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Mike Drob
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> When multiple concurrent queries come in at the same time, in several cases 
> they can trigger concurrent computations of a DocSet for the cache. We should 
> investigate where this happens and possibly take care to only do a single 
> computation when possible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to