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 Markus Jelsma <ma...@openindex.io> on 2017/05/03 11:04:19 UTC

RE: CloudDescriptor.getNumShards() sometimes returns null

Any ideas on this one? I am still puzzled by this oddity.

Many thanks,
Markus

 
 
-----Original message-----
> From:Markus Jelsma <ma...@openindex.io>
> Sent: Monday 24th April 2017 17:10
> To: solr-user@lucene.apache.org; solr-user <so...@lucene.apache.org>
> Subject: RE: CloudDescriptor.getNumShards() sometimes returns null
> 
> Sorry, forgot to mention the version, it is on 6.5.0.
> 
> Thanks,
> Markus
> 
>  
>  
> -----Original message-----
> > From:Erick Erickson <er...@gmail.com>
> > Sent: Monday 24th April 2017 16:50
> > To: solr-user <so...@lucene.apache.org>
> > Subject: Re: CloudDescriptor.getNumShards() sometimes returns null
> > 
> > What version of Solr? This has been reworked pretty heavily lately no
> > 6x and trunk.
> > 
> > On Mon, Apr 24, 2017 at 2:24 AM, Markus Jelsma
> > <ma...@openindex.io> wrote:
> > > Hi - that (RE: Overseer session expires on multiple collection creation) was the wrong thread. I meant, any ideas on this one?
> > >
> > > Many thanks,
> > > Markus
> > >
> > >
> > > -----Original message-----
> > >> From:Markus Jelsma <ma...@openindex.io>
> > >> Sent: Friday 14th April 2017 17:25
> > >> To: solr-user <so...@lucene.apache.org>
> > >> Subject: CloudDescriptor.getNumShards() sometimes returns null
> > >>
> > >> Hi - I've got this 2 shard/2 replica cluster. In handler i need the number of shards of the cluster.
> > >>
> > >>         cloudDescriptor = core.getCoreDescriptor().getCloudDescriptor();
> > >>         return cloudDescriptor.getNumShards();
> > >>
> > >> It is, however, depending on which node is executing this, sometimes null! This code only runs on shard leaders. First replica of the first shard always returns 2, but second replica of shard one, even when it is the leader, always gets me null. Same appears to be true for the second shard.
> > >>
> > >> I am clearly missing something, any ideas to share?
> > >>
> > >> Thanks,
> > >> Markus
> > >>
> > 
>