You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gregory Chanan (JIRA)" <ji...@apache.org> on 2014/07/17 01:01:06 UTC

[jira] [Commented] (SOLR-6252) Simplify UnInvertedField#getUnInvertedField synchronization module

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

Gregory Chanan commented on SOLR-6252:
--------------------------------------

bq. // This thread will load this field, don't let other threads try.

This comment no longer seems relevant

> Simplify UnInvertedField#getUnInvertedField synchronization module
> ------------------------------------------------------------------
>
>                 Key: SOLR-6252
>                 URL: https://issues.apache.org/jira/browse/SOLR-6252
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 5.0
>            Reporter: Vamsee Yarlagadda
>            Priority: Minor
>         Attachments: SOLR-6252.patch
>
>
> Looks like UnInvertedField#getUnInvertedField has implemented a bit additional synchronization module rather than what is required, and thereby increasing the complexity.
> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/request/UnInvertedField.java#L667
> As pointed out in the above link, as the synchronization is performed on the cache variable(which itself will protect the threads from obtaining access to the cache), we can safely remove all the placeholder flags. As long as cache.get() is in synchronized block, we can simply populate the cache with new entries and other threads will be able to see the changes.
> This change has been introduced in https://issues.apache.org/jira/browse/SOLR-2548 (Multithreaded faceting)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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