lucene-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-13898) Non-atomic use of SolrCache get / put
Date Fri, 15 Nov 2019 19:36:00 GMT

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

ASF subversion and git services commented on SOLR-13898:
--------------------------------------------------------

Commit 4d1fff37fc799035e5294cb274761a662a70fa61 in lucene-solr's branch refs/heads/branch_8x
from Andrzej Bialecki
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=4d1fff3 ]

SOLR-13898: Allow inexact double comparison. Close resources.


> Non-atomic use of SolrCache get / put
> -------------------------------------
>
>                 Key: SOLR-13898
>                 URL: https://issues.apache.org/jira/browse/SOLR-13898
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 8.3
>            Reporter: Andrzej Bialecki
>            Assignee: Andrzej Bialecki
>            Priority: Major
>             Fix For: 8.4
>
>         Attachments: SOLR-13898.patch, SOLR-13898.patch, SOLR-13898.patch
>
>
> As pointed out by [~ben.manes] in SOLR-13817 Solr code base in many key places uses
a similar pattern of non-atomic get / put calls to SolrCache-s. In multi-threaded environment
this leads to cache misses and additional unnecessary computations when competing threads
both discover a missing value, non-atomically compute it and update the cache.
> Some of these places are known performance bottlenecks where efficient caching is especially
important, such as {{SolrIndexSearcher}}, {{SolrDocumentFetcher}}, {{UninvertedField}} and
join queries .
> I propose to add {{SolrCache.computeIfAbsent(key, mappingFunction)}} that will atomically
retrieve existing values or compute and update the cache. This will require also changing
how the {{SolrCache.get(...)}} is used in many components.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Mime
View raw message