You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cassandra Targett (JIRA)" <ji...@apache.org> on 2018/01/10 21:23:00 UTC

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

     [ https://issues.apache.org/jira/browse/SOLR-4739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cassandra Targett updated SOLR-4739:
------------------------------------
    Component/s: SolrCloud

> 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
>          Components: SolrCloud
>            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 was sent by Atlassian JIRA
(v6.4.14#64029)

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