You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Natarajan, Rajeswari" <ra...@sap.com> on 2019/10/09 04:56:07 UTC

Re: [CAUTION] Re: Solr 7.7 restore issue

It looks like the rule created before was wrong.

From the solr documentation below
https://lucene.apache.org/solr/guide/7_6/rule-based-replica-placement.html

For a given shard, keep less than 2 replicas on any node
For this rule, we use the shard condition to define any shard, the replica condition with operators for "less than 2", and finally a pre-defined tag named node to define nodes with any name.

shard:*,replica:<2,node:*

The a above rule works fine with the restore.

Thanks,
Rajeswari

On 10/8/19, 9:34 PM, "Natarajan, Rajeswari" <ra...@sap.com> wrote:

    I am also facing the same issue. With Solr 7.6 restore fails with below rule. Would like to place one replica per node by below rule
    
     with the rule to place one replica per node
    "set-cluster-policy": [{
            "replica": "<2",
            "shard": "#EACH",
            "node": "#ANY"
        }]
    
    Without the rule the restore works. But we need this rule. Any suggestions to overcome this issue. 
    
    Thanks,
    Rajeswari
    
    On 7/12/19, 11:00 AM, "Mark Thill" <ma...@gmail.com> wrote:
    
        I have a 4 node cluster.  My goal is to have 2 shards with two replicas
        each and only allowing 1 core on each node.  I have a cluster policy set to:
        
        [{"replica":"2", "shard": "#EACH", "collection":"test",
        "port":"8983"},{"cores":"1", "node":"#ANY"}]
        
        I then manually create a collection with:
        
        name: test
        config set: test
        numShards: 2
        replicationFact: 2
        
        This works and I get a collection that looks like what I expect.  I then
        backup this collection.  But when I try to restore the collection it fails
        and says
        
        "Error getting replica locations : No node can satisfy the rules"
        [{"replica":"2", "shard": "#EACH", "collection":"test",
        "port":"8983"},{"cores":"1", "node":"#ANY"}]
        
        If I set my cluster-policy rules back to [] and try to restore it then
        successfully restores my collection exactly how I expect it to be.  It
        appears that having any cluster-policy rules in place is affecting my
        restore, but the "error getting replica locations" is strange.
        
        Any suggestions?
        
        mark <ma...@gmail.com>