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 Bram Van Dam <br...@intix.eu> on 2019/01/13 13:28:12 UTC

"no servers hosting shard" when querying during shard creation

Hey folks,

I'm getting SolrServerExceptions and I'm not sure whether this is by
design or whether this is a concurrency bug of some sort.

Basically I've got a pretty active collection which is being queried all
the time. Periodically, new shards are created (using the Collection
Admin API's CREATESHARD call). Creating the shard takes a certain amount
of time.

If a query is launched during the shard creation, I get a
SolrServerException from SolrJ: Error from server at foo: no servers
hosting shard: bar

This strikes me as odd. It's a new shard that's either still being
created or was just created, it's empty, so it shouldn't affect the
query in any way.

I had a quick nose around the code and found HttpShardHandler to be the
one throwing the exception. But it's unclear to me how or where it's
decided which shards are included in the query execution. Is this a bug?

Thanks,

 - Bram


Re: "no servers hosting shard" when querying during shard creation

Posted by Bram Van Dam <br...@intix.eu>.
On 13/01/2019 19:43, Erick Erickson wrote:
> Yeah, that seems wrong, I'd say open a JIRA.

I've created a bug in Jira: SOLR-13136. Should I assign this to anyone?
Unsure what the procedure is there.

Incidentally, while doing so I noticed that 7.6 is still "unreleased"
according to Jira.

Thanks,

 - Bram

Re: "no servers hosting shard" when querying during shard creation

Posted by Erick Erickson <er...@gmail.com>.
Yeah, that seems wrong, I'd say open a JIRA.

A band-aid might be add shards.tolerant=true, the query will complete, see:
https://lucene.apache.org/solr/guide/6_6/read-and-write-side-fault-tolerance.html#ReadandWriteSideFaultTolerance-shards.tolerant

that's not a fix, but would allow the queries to complete. Of course
if you _really_ had a problem the query would complete too....

Best,
Erick

On Sun, Jan 13, 2019 at 6:28 AM Bram Van Dam <br...@intix.eu> wrote:
>
> On 13/01/2019 14:28, Bram Van Dam wrote:
> > If a query is launched during the shard creation, I get a
> > SolrServerException from SolrJ: Error from server at foo: no servers
> > hosting shard: bar
>
> I should probably add that I'm running 7.6.0.

Re: "no servers hosting shard" when querying during shard creation

Posted by Bram Van Dam <br...@intix.eu>.
On 13/01/2019 14:28, Bram Van Dam wrote:
> If a query is launched during the shard creation, I get a
> SolrServerException from SolrJ: Error from server at foo: no servers
> hosting shard: bar

I should probably add that I'm running 7.6.0.