"no servers hosting shard" when querying during shard creation

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

"no servers hosting shard" when querying during shard creation

Bram Van Dam
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

Reply | Threaded
Open this post in threaded view
|

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

Bram Van Dam
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.
Reply | Threaded
Open this post in threaded view
|

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

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

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

Bram Van Dam
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