lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cassandra Targett (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-4739) May be lost update when creating or deleting Alias
Date Wed, 10 Jan 2018 21:23:00 GMT

     [ 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


Mime
View raw message