lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: Solr 7.5 DeleteShard not working when all cores are down
Date Fri, 15 Mar 2019 02:09:07 GMT
What Shawn said.

DeleteShard API is supposed to be used either when using implicit routing
or when you have compositeId router but the shard has already been split
and therefore in an inactive state.

Delete Replica API is what you need if you want to delete an individual
replica.

On Fri, Mar 15, 2019 at 12:39 AM Shawn Heisey <apache@elyograg.org> wrote:

> On 3/14/2019 12:47 PM, Aroop Ganguly wrote:
> > I am trying to delete a shard from a collection using the collections
> > api for the same.
> > On the solr ui,  all the replicas are in “downed” state.
> >
> > However, when I run the delete shard
> >
> command: /solr/admin/collections?action=DELETESHARD&collection=x&shard=shard84
> > I get this exception:
> > {
> >    "responseHeader":{
> >      "status":400,
> >      "QTime":14},
> >    "Operation deleteshard caused
> >
> exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
>
> > The slice: shard35 is currently active. Only non-active
> > (or custom-hashed) slices can be deleted.",
>
> <snip>
>
> > Why is this api thinking this slice is active ? When the Solr UI shows
> > all replicas down ?
>
> Active means the shard is considered part of the whole collection --
> included when you run a query, etc.
>
> Even though all replicas are down, the shard is still an active part of
> the index.  So you can't delete it.
>
> If your collection is typical and has compositeId routing, deleting a
> shard is really only possible after you have run SPLITSHARD and then you
> will only be able to delete the original shard that gets split.
>
> Aside from SPLITSHARD, I really have no idea how to mark a shard as
> inactive, but that will be required before you can delete it.
>
> Thanks,
> Shawn
>


-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message