Solr 7.7 restore issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr 7.7 restore issue

Mark Thill
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 <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Solr 7.7 restore issue

Natarajan, Rajeswari
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" <[hidden email]> 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 <[hidden email]>
   

Reply | Threaded
Open this post in threaded view
|

Re: Solr 7.7 restore issue

Koen De Groote
I also ran into this while researching cluster policies. Solr 7.6

Except same situation: introduce a rule to control placement of
collections. Backup. Delete. Restore. Solr complains it can't do it.

I don't need them just yet, so I stopped there, but reading this is quite
disturbing.

Does deleting the rule, restore and then immediately re-instating the rule
work?



On Wed, Oct 9, 2019 at 6:33 AM Natarajan, Rajeswari <
[hidden email]> 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" <[hidden email]> 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 <[hidden email]>
>
>
>