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

Noble Paul commented on SOLR-8747:
----------------------------------

We need a refactoring of this feature to ensure that locking is done at the 
right level. We should just link these two

> ExclusiveMarking enum and checkExclusiveMarking method is very confusing
> ------------------------------------------------------------------------
>
>                 Key: SOLR-8747
>                 URL: https://issues.apache.org/jira/browse/SOLR-8747
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>            Reporter: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 6.0, master
>
>
> ExclusiveMarking enum and checkExclusiveMarking method is very confusing.  It 
> appears to do the opposite of its name e.g.
> {code}
> @Override
>   public ExclusiveMarking checkExclusiveMarking(String collectionName, 
> ZkNodeProps message) {
>     // CLUSTERSTATUS is always mutually exclusive
>     //TODO deprecated remove this check .
>     if(CLUSTERSTATUS.isEqual(message.getStr(Overseer.QUEUE_OPERATION)))
>       return ExclusiveMarking.EXCLUSIVE;
>     synchronized (collectionWip) {
>       if(collectionWip.contains(collectionName))
>         return ExclusiveMarking.NONEXCLUSIVE;
>     }
>     return ExclusiveMarking.NOTDETERMINED;
>   }
> {code}
> I guess it returns exclusive if the current task is the only one to run. We 
> should document it or rename it to make its function more comprehensible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to