You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "milesli (JIRA)" <ji...@apache.org> on 2013/04/19 18:11:17 UTC

[jira] [Created] (SOLR-4739) May be lost update when creating or deleting Alias

milesli created SOLR-4739:
-----------------------------

             Summary: May be lost update when creating or deleting Alias 
                 Key: SOLR-4739
                 URL: https://issues.apache.org/jira/browse/SOLR-4739
             Project: Solr
          Issue Type: Bug
            Reporter: milesli


we may create or delete alias before zookeeper notify alias watch, 
then clone the current aliases and update
finally send data to zookeeper.
so it may lead to lost of update. 



add a line code:  zkStateReader.setAliases(newAliases);

...

try {
      zkStateReader.getZkClient().setData(ZkStateReader.ALIASES,
          jsonBytes, true);
      
     // update the current aliases
      zkStateReader.setAliases(newAliases);
      
      checkForAlias(aliasName, collections);
      // some fudge for other nodes
      Thread.sleep(100);
    } catch (KeeperException e) {
      log.error("", e);
      throw new SolrException(ErrorCode.SERVER_ERROR, e);
    } catch (InterruptedException e) {
      log.warn("", e);
      throw new SolrException(ErrorCode.SERVER_ERROR, e);
    }

...



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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