You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mike Drob (JIRA)" <ji...@apache.org> on 2016/09/16 16:07:20 UTC
[jira] [Commented] (SOLR-9524)
SolrIndexSearcher.getIndexFingerprint uses dubious sunchronization
[ https://issues.apache.org/jira/browse/SOLR-9524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496673#comment-15496673 ]
Mike Drob commented on SOLR-9524:
---------------------------------
Might not actually be DCL because we _do_ reload the value. I still think this method can be cleaned up though.
> SolrIndexSearcher.getIndexFingerprint uses dubious sunchronization
> ------------------------------------------------------------------
>
> Key: SOLR-9524
> URL: https://issues.apache.org/jira/browse/SOLR-9524
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 6.3
> Reporter: Mike Drob
>
> In SOLR-9310 we added more code that does some fingerprint caching in SolrIndexSearcher. However, the synchronization looks like it could be made more efficient and may have issues with correctness.
> https://github.com/apache/lucene-solr/blob/branch_6x/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L2371-L2385
> Some of the issues:
> * Double checked locking needs use of volatile variables to ensure proper memory semantics.
> * sync on a ConcurrentHashMap is usually a code smell
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org