6.6.0 getNumShards() NPE?!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

6.6.0 getNumShards() NPE?!

Markus Jelsma-2
Hello,

Having trouble, again, with CloudDescriptor and friend, getting the number of shards of the collection. It sometimes returns 1 for a collection of two shards. Having this code:

      cloudDescriptor = core.getCoreDescriptor().getCloudDescriptor();
      return cloudDescriptor.getNumShards();

In some cases cloudDescriptor.getNumShards() throws an NPE. Am i doing something wrong?

Thanks,
Markus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: 6.6.0 getNumShards() NPE?!

Markus Jelsma-2
I can now reproduce it on the two shard, two replica cluster.

It does NOT happen on the collection_shard1_replica1 and collection_shard2_replica1 nodes.

It happens consistently on the collection_shard1_replica2 and collection_shard2_replica2 nodes.

Any ideas?

-----Original message-----

> From:Markus Jelsma <[hidden email]>
> Sent: Thursday 10th August 2017 12:34
> To: Solr-user <[hidden email]>
> Subject: 6.6.0 getNumShards() NPE?!
>
> Hello,
>
> Having trouble, again, with CloudDescriptor and friend, getting the number of shards of the collection. It sometimes returns 1 for a collection of two shards. Having this code:
>
>       cloudDescriptor = core.getCoreDescriptor().getCloudDescriptor();
>       return cloudDescriptor.getNumShards();
>
> In some cases cloudDescriptor.getNumShards() throws an NPE. Am i doing something wrong?
>
> Thanks,
> Markus
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 6.6.0 getNumShards() NPE?!

Shalin Shekhar Mangar
Can you please post the steps to reproduce this?

On Thu, Aug 10, 2017 at 4:12 PM, Markus Jelsma
<[hidden email]> wrote:

> I can now reproduce it on the two shard, two replica cluster.
>
> It does NOT happen on the collection_shard1_replica1 and collection_shard2_replica1 nodes.
>
> It happens consistently on the collection_shard1_replica2 and collection_shard2_replica2 nodes.
>
> Any ideas?
>
> -----Original message-----
>> From:Markus Jelsma <[hidden email]>
>> Sent: Thursday 10th August 2017 12:34
>> To: Solr-user <[hidden email]>
>> Subject: 6.6.0 getNumShards() NPE?!
>>
>> Hello,
>>
>> Having trouble, again, with CloudDescriptor and friend, getting the number of shards of the collection. It sometimes returns 1 for a collection of two shards. Having this code:
>>
>>       cloudDescriptor = core.getCoreDescriptor().getCloudDescriptor();
>>       return cloudDescriptor.getNumShards();
>>
>> In some cases cloudDescriptor.getNumShards() throws an NPE. Am i doing something wrong?
>>
>> Thanks,
>> Markus
>>



--
Regards,
Shalin Shekhar Mangar.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: 6.6.0 getNumShards() NPE?!

Markus Jelsma-2
In reply to this post by Markus Jelsma-2
Sure!

Any plugin that has SolrCore has the problem, a RequestHandler for example:

  public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
    LOG.info("numShards: "+ core.getCoreDescriptor().getCloudDescriptor().getNumShards());
  }

2017-08-14 15:20:54.995 INFO  (qtp475266352-20) [c:logs s:shard1 r:core_node3 x:collection1_shard1_replica2] i.o.l.h.CacheHandler numShards: null
2017-08-14 15:20:58.753 INFO  (qtp475266352-15) [c:logs s:shard1 r:core_node2 x:collection1_shard1_replica1] i.o.l.h.CacheHandler numShards: 2
2017-08-14 15:24:43.589 INFO  (qtp475266352-237) [c:logs s:shard2 r:core_node1 x:logs_shard2_replica1] i.o.l.h.CheckerCacheHandler numShards: 2
2017-08-14 15:24:57.446 INFO  (qtp475266352-21) [c:logs s:shard2 r:core_node4 x:logs_shard2_replica2] i.o.l.h.CheckerCacheHandler numShards: null

The problem is very consistent.

Thanks,
Markus
 
-----Original message-----

> From:Shalin Shekhar Mangar <[hidden email]>
> Sent: Monday 14th August 2017 15:13
> To: [hidden email]
> Subject: Re: 6.6.0 getNumShards() NPE?!
>
> Can you please post the steps to reproduce this?
>
> On Thu, Aug 10, 2017 at 4:12 PM, Markus Jelsma
> <[hidden email]> wrote:
> > I can now reproduce it on the two shard, two replica cluster.
> >
> > It does NOT happen on the collection_shard1_replica1 and collection_shard2_replica1 nodes.
> >
> > It happens consistently on the collection_shard1_replica2 and collection_shard2_replica2 nodes.
> >
> > Any ideas?
> >
> > -----Original message-----
> >> From:Markus Jelsma <[hidden email]>
> >> Sent: Thursday 10th August 2017 12:34
> >> To: Solr-user <[hidden email]>
> >> Subject: 6.6.0 getNumShards() NPE?!
> >>
> >> Hello,
> >>
> >> Having trouble, again, with CloudDescriptor and friend, getting the number of shards of the collection. It sometimes returns 1 for a collection of two shards. Having this code:
> >>
> >>       cloudDescriptor = core.getCoreDescriptor().getCloudDescriptor();
> >>       return cloudDescriptor.getNumShards();
> >>
> >> In some cases cloudDescriptor.getNumShards() throws an NPE. Am i doing something wrong?
> >>
> >> Thanks,
> >> Markus
> >>
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
Loading...