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

Shalin Shekhar Mangar commented on SOLR-13897:
----------------------------------------------

Here's a patch that changes the Terms to an AtomicReference. However, I am not 
convinced that it is still correct. Seems there can be race conditions between 
registerTerm and removeTerm and also onTermUpdates might receive updates out of 
order (i.e. monotonic term versions are not guaranteed inside onTermUpdates)

> Unsafe publication of Terms object in ZkShardTerms
> --------------------------------------------------
>
>                 Key: SOLR-13897
>                 URL: https://issues.apache.org/jira/browse/SOLR-13897
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>    Affects Versions: 8.2, 8.3
>            Reporter: Shalin Shekhar Mangar
>            Priority: Major
>             Fix For: master (9.0), 8.4
>
>         Attachments: SOLR-13897.patch
>
>
> The Terms object in ZkShardTerms is written using a write lock but reading is 
> allowed freely. This is not safe and can cause visibility issues and 
> associated race conditions under contention.



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

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

Reply via email to