You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2016/02/27 02:01:33 UTC

[jira] [Created] (SOLR-8747) ExclusiveMarking enum and checkExclusiveMarking method is very confusing

Shalin Shekhar Mangar created SOLR-8747:
-------------------------------------------

             Summary: 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: master, 6.0


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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org