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 2019/11/21 00:38:14 UTC

[GitHub] [lucene-solr] tflobbe commented on a change in pull request #1023: SOLR-13950: Fix getLeaderRetry swallowing interrupt in ZkStateReader

tflobbe commented on a change in pull request #1023: SOLR-13950: Fix getLeaderRetry swallowing interrupt in ZkStateReader
URL: https://github.com/apache/lucene-solr/pull/1023#discussion_r348845903
 
 

 ##########
 File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
 ##########
 @@ -968,7 +968,10 @@ public Replica getLeaderRetry(String collection, String shard, int timeout) thro
         }
         return false;
       });
-    } catch (TimeoutException | InterruptedException e) {
+    } catch (InterruptedException e) {
+      Thread.currentThread().interrupt();
+      throw e;
 
 Review comment:
   I guess if we are going to throw the `InterruptedException` anyway then why catch it?
   The options in my mind are either not catch `InterruptedException` at all, or catch it, mark the thread as interrupted and then throw SolrException

----------------------------------------------------------------
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


With regards,
Apache Git Services

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