You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/09/13 15:25:30 UTC

[GitHub] [lucene-solr] Hronom opened a new pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Hronom opened a new pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864


   All derived classes from `ExactStatsCache` fails if `shards.tolerant=true` and some shard is down.
   
   ```
   java.lang.NullPointerException
   	at org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:59)
   	at org.apache.solr.search.stats.ExactStatsCache.doMergeToGlobalStats(ExactStatsCache.java:104)
   	at org.apache.solr.search.stats.StatsCache.mergeToGlobalStats(StatsCache.java:173)
   	at org.apache.solr.handler.component.QueryComponent.updateStats(QueryComponent.java:713)
   	at org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:630)
   	at org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:605)
   	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:457)
   	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:214)
   	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2606)
   	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:812)
   	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:588)
   	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:415)
   	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
   	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
   	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
   	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
   	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
   	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
   	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
   	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
   	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
   	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215)
   	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
   	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
   	at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
   	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.server.Server.handle(Server.java:500)
   	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
   	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
   	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
   	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
   	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
   	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
   	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
   	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
   	at java.base/java.lang.Thread.run(Unknown Source)
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r493662797



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @sigram @madrob I added test that reproduces the problem in `TestExactStatsCache`. And it fails with null exception if you remove my fix.
   
   Please can you adjust it(if needed) to nicely fit in solr tests suits.
   
   The trick here with this issue, that its reproducible only when at least one shard is fully down(no healthy replica there). This is why I didn't use `setDistributedParams`, since it's add's one work replica, so all shards is healthy and there no situation when one shard is completely down.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r492247322



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       No, `SHARDS_TOLERANT` can have third parameter https://lucene.apache.org/solr/guide/8_6/solrcloud-query-routing-and-read-tolerance.html#shards-tolerant-parameter
   ```
   In addition to true and false, shards.tolerant may also be set to requireZkConnected - see below.
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#issuecomment-693648037


   
   @munendrasn do you need something specific?
   To reproduce problem you need to use some subset of `ExactStatsCache` for example `ExactSharedStatsCache` and run any simple query with `shards.tolerant=true` and put down 1 shard in your solr cloud cluster. And you will get exception...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r493662797



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @sigram @madrob I added test that reproduces the problem in `TestExactStatsCache`.
   
   Please can you adjust it(if needed) to nicely fit in solr tests suits.
   
   The trick here with this issue, that its reproducible only when at least one shard is fully down(no healthy replica there). This is why I didn't use `setDistributedParams`, since it's add's one work replica, so all shards is healthy and there no situation when one shard is completely down.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] munendrasn commented on pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
munendrasn commented on pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#issuecomment-692740084


   @Hronom 
   Thanks for raising the PR against the master. I will look into it. In meantime, could you please a test to demonstrate the problem?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r492247322



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       No, `SHARDS_TOLERANT` can have third parameter https://lucene.apache.org/solr/guide/8_6/solrcloud-query-routing-and-read-tolerance.html#shards-tolerant-parameter
   ```
   In addition to true and false, shards.tolerant may also be set to requireZkConnected - see below.
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] madrob commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
madrob commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r492181202



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       Should we use `getBool` here instead?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] sigram commented on pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
sigram commented on pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#issuecomment-713504160


   @Hronom this has been merged manually, please close this PR - thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r493662797



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @sigram @madrob I added test that reproduces the problem in `TestExactStatsCache`. And it fails with null exception if you remove my fix.
   
   Please can you adjust it(if needed) to nicely fit in solr tests suits, I set now `Allow edits by maintainers`.
   
   The trick here with this issue, that its reproducible only when at least one shard is fully down(no healthy replica there). This is why I didn't use `setDistributedParams`, since it's add's one work replica, so all shards is healthy and there no situation when one shard is completely down.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r493662797



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @sigram @madrob I added test that reproduces the problem in `TestExactStatsCache`.
   
   Please can you adjust it(if needed) to nicely fit in solr tests suits.
   
   The trick here with this issue, that is reproducible only when at least one shard is fully down. This is why I didn't use `setDistributedParams`, since it's add's one work replica, so all shards is healthy and there no situation when one shard is completely down.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r493408910



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @sigram thank you for details where to put this, let me work on this, I will ping you back when it's done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r493662797



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @sigram @madrob I added test that reproduces the problem in `TestExactStatsCache`.
   
   Please can you adjust it(if needed) to nicely feet in solr tests suits.
   
   The trick here with this issue, that is reproducible only when at least one shard is fully down. This is why I didn't use `setDistributedParams`, since it's add's one work replica, so all shards is healthy and there no situation when one shard is completely down.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#issuecomment-713514040


   Ok


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] madrob commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
madrob commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r492181202



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       Should we use `getBool` here instead?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r493408910



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @sigram thank you for details there to put this, let me work on this, I will ping you back when it's done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] sigram commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
sigram commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r492706938



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @Hronom I'd like to merge this PR soon, can you add a couple lines to `TestDefaultStatsCache` to verify this fix works? `BaseDistributedSearchTestCase` already creates 3 "dead servers", which you can explicitly add to the query params; `shards` parameter using its `setDistributedParams(params)` method.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] sigram commented on a change in pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
sigram commented on a change in pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864#discussion_r492706938



##########
File path: solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
##########
@@ -94,6 +94,12 @@ protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb) {
   protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses) {
     Set<Term> allTerms = new HashSet<>();
     for (ShardResponse r : responses) {
+      if ("true".equalsIgnoreCase(req.getParams().get(ShardParams.SHARDS_TOLERANT)) && r.getException() != null) {

Review comment:
       @Hronom I'd like to merge this PR soon, can you add a couple lines to `TestDefaultStatsCache` to verify this fix works? `BaseDistributedSearchTestCase` already creates 3 "dead servers", which you can explicitly add to the query params; `shards` parameter using its `setDistributedParams(params)` method.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] Hronom closed pull request #1864: SOLR-14850 ExactStatsCache NullPointerException when shards.tolerant=true

Posted by GitBox <gi...@apache.org>.
Hronom closed pull request #1864:
URL: https://github.com/apache/lucene-solr/pull/1864


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org