You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2019/05/16 16:48:33 UTC

[lucene-solr] branch branch_7_7 updated (06e057a -> e9f7c88)

This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a change to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


    from 06e057a  Adding 6.6.6 backcompat indexes and Version entry
     new 6c72781  SOLR-13254: Correct message that is logged in solrj's ConnectionManager when an exception occurred while reconnecting to ZooKeeper. (hu xiaodong via Christine Poerschke)
     new c82b649  SOLR-13252: Fix an NPE when setting a "policy" property for an existing collection.
     new 5aff0a8  LUCENE-8720: fix int overflow in NameIntCacheLRU
     new af48f04  SOLR-13398: Move log "Processing SSL Credential Provider chain" from INFO to DEBUG to prevent leaking into bin/solr printout
     new 1ebc103  SOLR-13386: OverseerTaskQueue#remove should not throw an exception when no node exists after an exists check and the Overseer work loop should not allow free spinning the loop when it hits a KeeperException.
     new e88a307  SOLR-13366: Clarify 'Invalid stage name' warning logging in AutoScalingConfig
     new 97bb70e  SOLR-13352: Remove risk of deadlock/threadleak when shutting down an Overseer(TriggerThread)
     new e9f7c88  SOLR-13229: Cleanup replicasMetTragicEvent after all exceptions

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lucene/CHANGES.txt                                 |  3 ++
 .../writercache/LruTaxonomyWriterCache.java        |  2 +-
 .../taxonomy/writercache/NameIntCacheLRU.java      |  4 +--
 solr/CHANGES.txt                                   | 17 +++++++++++
 .../apache/solr/cloud/OverseerTaskProcessor.java   |  9 ++++++
 .../org/apache/solr/cloud/OverseerTaskQueue.java   |  6 ++--
 .../java/org/apache/solr/cloud/ZkController.java   | 18 ++++++++----
 .../OverseerCollectionMessageHandler.java          |  2 +-
 .../cloud/autoscaling/OverseerTriggerThread.java   | 33 +++++++++-------------
 .../java/org/apache/solr/core/CoreContainer.java   | 11 ++++----
 .../SSLCredentialProviderFactory.java              |  2 +-
 .../src/solrcloud-autoscaling-listeners.adoc       |  2 +-
 .../solrj/cloud/autoscaling/AutoScalingConfig.java |  3 +-
 .../solr/common/cloud/ConnectionManager.java       |  2 +-
 14 files changed, 73 insertions(+), 41 deletions(-)


[lucene-solr] 01/08: SOLR-13254: Correct message that is logged in solrj's ConnectionManager when an exception occurred while reconnecting to ZooKeeper. (hu xiaodong via Christine Poerschke)

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 6c7278117c6712147580731a4d6ff6d4019e452d
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Thu Mar 7 21:17:31 2019 +0100

    SOLR-13254: Correct message that is logged in solrj's ConnectionManager when an exception occurred while reconnecting to ZooKeeper. (hu xiaodong via Christine Poerschke)
    
    (cherry picked from commit 683aa3d3e9b7e8d66b5be737dade3ffc0690c7c5)
---
 solr/CHANGES.txt                                                       | 3 +++
 .../solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 3fd6ce5..248b613 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -89,6 +89,9 @@ Bug fixes
 * SOLR-13410: Designated overseer wasn't able to rejoin election queue at head upon restart (Ishan Chattopadhyaya,
   Kesharee Nandan Vishwakarma)
 
+* SOLR-13254: Correct message that is logged in solrj's ConnectionManager when an exception
+  occurred while reconnecting to ZooKeeper. (hu xiaodong via Christine Poerschke)
+
 ==================  7.7.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
index 3a55988..5f93e30 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
@@ -183,7 +183,7 @@ public class ConnectionManager implements Watcher {
           
         } catch (Exception e) {
           SolrException.log(log, "", e);
-          log.info("Could not connect due to error, sleeping for 5s and trying agian");
+          log.info("Could not connect due to error, sleeping for 1s and trying again");
           waitSleep(1000);
         }
         


[lucene-solr] 06/08: SOLR-13366: Clarify 'Invalid stage name' warning logging in AutoScalingConfig

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit e88a307eba4eaf94c482bedb19f8b0c304131a21
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Fri Apr 12 17:01:55 2019 +0200

    SOLR-13366: Clarify 'Invalid stage name' warning logging in AutoScalingConfig
    
    (Cherry picked from cae323629e437c47855c4c8578f76310fd2b7b84)
---
 solr/CHANGES.txt                                                       | 2 ++
 solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc           | 2 +-
 .../apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java  | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9b3be53..ba6bf03 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -100,6 +100,8 @@ Bug fixes
   check and the Overseer work loop should not allow free spinning the loop when it hits a KeeperException.
   (Mark Miller, Fernandez-Lobbe, Mike Drob)
 
+* SOLR-13366: Clarify 'Invalid stage name' warning logging in AutoScalingConfig (Christine Poerschke)
+
 ==================  7.7.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
index f3cc02d..6e6bfca 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
@@ -155,7 +155,7 @@ trigger named `foo`):
 {
  "name" : "foo.system",
  "trigger" : "solr.SystemLogListener",
- "stage" : ["WAITING", "STARTED", "ABORTED", "SUCCEEDED", "FAILED", "BEFORE_ACTION", "AFTER_ACTION"]
+ "stage" : ["STARTED", "ABORTED", "SUCCEEDED", "FAILED", "BEFORE_ACTION", "AFTER_ACTION"]
 }
 ----
 
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
index 335312e..34c39bd 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
@@ -81,7 +81,8 @@ public class AutoScalingConfig implements MapWriter {
           TriggerEventProcessorStage stage = TriggerEventProcessorStage.valueOf(String.valueOf(stageName).toUpperCase(Locale.ROOT));
           stages.add(stage);
         } catch (Exception e) {
-          log.warn("Invalid stage name '" + name + "' in listener config, skipping: " + properties);
+          log.warn("Invalid stage name '{}' for '{}' in listener config, skipping it in: {}",
+              stageName, name, properties);
         }
       }
       listenerClass = (String)this.properties.get(AutoScalingParams.CLASS);


[lucene-solr] 05/08: SOLR-13386: OverseerTaskQueue#remove should not throw an exception when no node exists after an exists check and the Overseer work loop should not allow free spinning the loop when it hits a KeeperException.

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 1ebc103a8231ba5143f0b5fa487ff4ebd316ac1b
Author: markrmiller <ma...@apache.org>
AuthorDate: Mon Apr 15 19:53:03 2019 +0200

    SOLR-13386: OverseerTaskQueue#remove should not throw an exception when no node exists after an exists check and the Overseer work loop should not allow free spinning the loop when it hits a KeeperException.
    
    (Cherry picked from fe37e18d1064cc1460be67bd1ea891ad1d0d362e)
---
 solr/CHANGES.txt                                                 | 4 ++++
 .../src/java/org/apache/solr/cloud/OverseerTaskProcessor.java    | 9 +++++++++
 solr/core/src/java/org/apache/solr/cloud/OverseerTaskQueue.java  | 6 ++++--
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f80e9bb..9b3be53 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -96,6 +96,10 @@ Bug fixes
 
 * SOLR-13398: Move log line "Processing SSL Credential Provider chain..." from INFO to DEBUG (janhoy)
 
+* SOLR-13386: OverseerTaskQueue#remove should not throw an exception when no node exists after an exists
+  check and the Overseer work loop should not allow free spinning the loop when it hits a KeeperException.
+  (Mark Miller, Fernandez-Lobbe, Mike Drob)
+
 ==================  7.7.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
index d5557e8..f45d37f 100644
--- a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
@@ -321,6 +321,15 @@ public class OverseerTaskProcessor implements Runnable, Closeable {
             return;
           }
           SolrException.log(log, "", e);
+          
+          // Prevent free-spinning this loop.
+          try {
+            Thread.sleep(1000);
+          } catch (InterruptedException e1) {
+            Thread.currentThread().interrupt();
+            return;
+          }
+          
         } catch (InterruptedException e) {
           Thread.currentThread().interrupt();
           return;
diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskQueue.java b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskQueue.java
index 66a31c5..62d788c 100644
--- a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskQueue.java
+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskQueue.java
@@ -93,9 +93,11 @@ public class OverseerTaskQueue extends ZkDistributedQueue {
       String path = event.getId();
       String responsePath = dir + "/" + RESPONSE_PREFIX
           + path.substring(path.lastIndexOf("-") + 1);
-      if (zookeeper.exists(responsePath, true)) {
+
+      try {
         zookeeper.setData(responsePath, event.getBytes(), true);
-      } else {
+      } catch (KeeperException.NoNodeException ignored) {
+        // we must handle the race case where the node no longer exists
         log.info("Response ZK path: " + responsePath + " doesn't exist."
             + "  Requestor may have disconnected from ZooKeeper");
       }


[lucene-solr] 02/08: SOLR-13252: Fix an NPE when setting a "policy" property for an existing collection.

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit c82b649659a95df058ba757d81f80b975365b2a7
Author: Jan Høydahl <ja...@apache.org>
AuthorDate: Thu May 16 16:13:57 2019 +0200

    SOLR-13252: Fix an NPE when setting a "policy" property for an existing collection.
    
    (Cherry picked from 7e8a2df254b47b2b57d00a3bd75164d43c019abf)
---
 solr/CHANGES.txt                                                        | 2 ++
 .../solr/cloud/api/collections/OverseerCollectionMessageHandler.java    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 248b613..99660e9 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -92,6 +92,8 @@ Bug fixes
 * SOLR-13254: Correct message that is logged in solrj's ConnectionManager when an exception
   occurred while reconnecting to ZooKeeper. (hu xiaodong via Christine Poerschke)
 
+* SOLR-13252: Fix an NPE when setting a "policy" property for an existing collection (ab)
+
 ==================  7.7.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
index a14dc6b..8f3dc64 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
@@ -686,7 +686,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler,
         if (!updateKey.equals(ZkStateReader.COLLECTION_PROP)
             && !updateKey.equals(Overseer.QUEUE_OPERATION)
             && updateEntry.getValue() != null // handled below in a separate conditional
-            && !collection.get(updateKey).equals(updateEntry.getValue())){
+            && !updateEntry.getValue().equals(collection.get(updateKey))) {
           areChangesVisible = false;
           break;
         }


[lucene-solr] 07/08: SOLR-13352: Remove risk of deadlock/threadleak when shutting down an Overseer(TriggerThread)

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 97bb70e73710a701abeed2997d535bc0fc98d7a5
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Mon Apr 1 19:34:51 2019 +0200

    SOLR-13352: Remove risk of deadlock/threadleak when shutting down an Overseer(TriggerThread)
    
    (cherry picked from commit 1071d093360b2c5869a918de743c7089952094f4)
---
 solr/CHANGES.txt                                   |  2 ++
 .../cloud/autoscaling/OverseerTriggerThread.java   | 33 +++++++++-------------
 2 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ba6bf03..a08adf6 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -102,6 +102,8 @@ Bug fixes
 
 * SOLR-13366: Clarify 'Invalid stage name' warning logging in AutoScalingConfig (Christine Poerschke)
 
+* SOLR-13352: Remove risk of deadlock/threadleak when shutting down an Overseer(TriggerThread).  (hossman)
+
 ==================  7.7.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java
index de875fb..5758627 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java
@@ -184,48 +184,43 @@ public class OverseerTriggerThread implements Runnable, SolrCloseable {
     while (true) {
       Map<String, AutoScaling.Trigger> copy = null;
       try {
-        // this can throw InterruptedException and we don't want to unlock if it did, so we keep this outside
-        // of the try/finally block
+        
         updateLock.lockInterruptibly();
-
-        // must check for close here before we await on the condition otherwise we can only be woken up on interruption
-        if (isClosed) {
-          log.info("OverseerTriggerThread has been closed, exiting.");
-          break;
-        }
-
-        log.debug("Current znodeVersion {}, lastZnodeVersion {}", znodeVersion, lastZnodeVersion);
-
         try {
+          // must check for close here before we await on the condition otherwise we can
+          // only be woken up on interruption
+          if (isClosed) {
+            log.info("OverseerTriggerThread has been closed, exiting.");
+            break;
+          }
+          
+          log.debug("Current znodeVersion {}, lastZnodeVersion {}", znodeVersion, lastZnodeVersion);
+          
           if (znodeVersion == lastZnodeVersion) {
             updated.await();
-
+            
             // are we closed?
             if (isClosed) {
               log.info("OverseerTriggerThread woken up but we are closed, exiting.");
               break;
             }
-
+            
             // spurious wakeup?
             if (znodeVersion == lastZnodeVersion) continue;
           }
           copy = new HashMap<>(activeTriggers);
           lastZnodeVersion = znodeVersion;
           log.debug("Processed trigger updates upto znodeVersion {}", znodeVersion);
-        } catch (InterruptedException e) {
-          // Restore the interrupted status
-          Thread.currentThread().interrupt();
-          log.warn("Interrupted", e);
-          break;
         } finally {
           updateLock.unlock();
         }
       } catch (InterruptedException e) {
         // Restore the interrupted status
         Thread.currentThread().interrupt();
+        log.warn("Interrupted", e);
         break;
       }
-
+     
       // update the current config
       scheduledTriggers.setAutoScalingConfig(autoScalingConfig);
 


[lucene-solr] 03/08: LUCENE-8720: fix int overflow in NameIntCacheLRU

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 5aff0a8937a9488bf985e1f81c96a1533dc3b085
Author: Jan Høydahl <ja...@apache.org>
AuthorDate: Thu May 16 16:16:57 2019 +0200

    LUCENE-8720: fix int overflow in NameIntCacheLRU
    
    (Cherry picked from c9de94c66333fa3adfd0878ca6d38e05faff1738)
---
 lucene/CHANGES.txt                                                    | 3 +++
 .../lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java     | 2 +-
 .../org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java | 4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 9312c24..065db66 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -23,6 +23,9 @@ Bug fixes
   This causes assertion errors and potentially broken field attributes in the IndexWriter when
   IndexWriter#deleteAll is called while actively indexing. (Simon Willnauer) 
 
+* LUCENE-8720: NameIntCacheLRU (in the facets module) had an int
+  overflow bug that disabled cleaning of the cache (Russell A Brown)
+
 ======================= Lucene 7.7.1 =======================
 (No changes)
 
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java
index bab29f6..68588c5 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java
@@ -112,7 +112,7 @@ public class LruTaxonomyWriterCache implements TaxonomyWriterCache {
     // visible to us we need to make sure that the changes have been
     // committed and we reopen the reader. Because this is a slow
     // operation, we don't delete entries one-by-one but rather in bulk
-    // (put() removes the 2/3rd oldest entries).
+    // (put() removes the 1/3rd oldest entries).
     if (ret) {
       cache.makeRoomLRU();
     }
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java
index 778f0b7..a7f96f4 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java
@@ -109,13 +109,13 @@ class NameIntCacheLRU {
    * if anything was removed, false otherwise.
    * 
    * See comment in DirectoryTaxonomyWriter.addToCache(CategoryPath, int) for an
-   * explanation why we clean 2/3rds of the cache, and not just one entry.
+   * explanation why we clean 1/3rd of the cache, and not just one entry.
    */ 
   boolean makeRoomLRU() {
     if (!isCacheFull()) {
       return false;
     }
-    int n = cache.size() - (2*maxCacheSize)/3;
+    int n = cache.size() - (int)((2L*maxCacheSize)/3);
     if (n<=0) {
       return false;
     }


[lucene-solr] 04/08: SOLR-13398: Move log "Processing SSL Credential Provider chain" from INFO to DEBUG to prevent leaking into bin/solr printout

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit af48f0437f50c5145fb1e55a38bb7e25e0b1f87e
Author: Jan Høydahl <ja...@apache.org>
AuthorDate: Fri Apr 12 11:54:40 2019 +0200

    SOLR-13398: Move log "Processing SSL Credential Provider chain" from INFO to DEBUG to prevent leaking into bin/solr printout
    
    (cherry picked from commit 03f5a5e7a1d75d6502087dbcc1ca86450875a233)
---
 solr/CHANGES.txt                                                        | 2 ++
 .../apache/solr/util/configuration/SSLCredentialProviderFactory.java    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 99660e9..f80e9bb 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -94,6 +94,8 @@ Bug fixes
 
 * SOLR-13252: Fix an NPE when setting a "policy" property for an existing collection (ab)
 
+* SOLR-13398: Move log line "Processing SSL Credential Provider chain..." from INFO to DEBUG (janhoy)
+
 ==================  7.7.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/java/org/apache/solr/util/configuration/SSLCredentialProviderFactory.java b/solr/core/src/java/org/apache/solr/util/configuration/SSLCredentialProviderFactory.java
index 1fcfd96..b5ea036 100644
--- a/solr/core/src/java/org/apache/solr/util/configuration/SSLCredentialProviderFactory.java
+++ b/solr/core/src/java/org/apache/solr/util/configuration/SSLCredentialProviderFactory.java
@@ -56,7 +56,7 @@ public class SSLCredentialProviderFactory {
 
   public List<SSLCredentialProvider> getProviders() {
     ArrayList<SSLCredentialProvider> providers = new ArrayList<>();
-    log.info(String.format(Locale.ROOT, "Processing SSL Credential Provider chain: %s", providerChain));
+    log.debug(String.format(Locale.ROOT, "Processing SSL Credential Provider chain: %s", providerChain));
     String classPrefix = "class://";
     for (String provider : providerChain.split(";")) {
       if (defaultProviders.containsKey(provider)) {


[lucene-solr] 08/08: SOLR-13229: Cleanup replicasMetTragicEvent after all exceptions

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_7_7
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit e9f7c88097106cfcd33a8e657607d8123d5df6cd
Author: Tomas Fernandez Lobbe <tf...@apache.org>
AuthorDate: Thu Feb 7 01:43:47 2019 +0100

    SOLR-13229: Cleanup replicasMetTragicEvent after all exceptions
    
    (cherry picked from commit 8ac34c2d6d105ae342985b2baaa00cc6c5bf4cfd)
---
 solr/CHANGES.txt                                       |  2 ++
 .../src/java/org/apache/solr/cloud/ZkController.java   | 18 ++++++++++++------
 .../src/java/org/apache/solr/core/CoreContainer.java   | 11 +++++------
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a08adf6..b70bd05 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -104,6 +104,8 @@ Bug fixes
 
 * SOLR-13352: Remove risk of deadlock/threadleak when shutting down an Overseer(TriggerThread).  (hossman)
 
+* SOLR-13229: Cleanup replicasMetTragicEvent after all types of exception (Tomás Fernández Löbbe)
+
 ==================  7.7.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index b9adc2d..da7abe7 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -630,7 +630,14 @@ public class ZkController implements Closeable {
     assert ObjectReleaseTracker.release(this);
   }
 
+  /**
+   * Best effort to give up the leadership of a shard in a core after hitting a tragic exception
+   * @param cd The current core descriptor
+   * @param tragicException The tragic exception from the {@code IndexWriter}
+   */
   public void giveupLeadership(CoreDescriptor cd, Throwable tragicException) {
+    assert tragicException != null;
+    assert cd != null;
     DocCollection dc = getClusterState().getCollectionOrNull(cd.getCollectionName());
     if (dc == null) return;
 
@@ -668,13 +675,12 @@ public class ZkController implements Closeable {
           props.put(ZkStateReader.REPLICA_TYPE, cd.getCloudDescriptor().getReplicaType().name().toUpperCase(Locale.ROOT));
           props.put(CoreAdminParams.NODE, getNodeName());
           getOverseerCollectionQueue().offer(Utils.toJSON(new ZkNodeProps(props)));
-        } catch (KeeperException e) {
-          log.info("Met exception on give up leadership for {}", key, e);
-          replicasMetTragicEvent.remove(key);
-        } catch (InterruptedException e) {
-          Thread.currentThread().interrupt();
-          log.info("Met exception on give up leadership for {}", key, e);
+        } catch (Exception e) {
+          // Exceptions are not bubbled up. giveupLeadership is best effort, and is only called in case of some other
+          // unrecoverable error happened
+          log.error("Met exception on give up leadership for {}", key, e);
           replicasMetTragicEvent.remove(key);
+          SolrZkClient.checkInterrupted(e);
         }
       }
     }
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index faa2f0e..ba2d943 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -1863,8 +1863,9 @@ public class CoreContainer {
   }
 
   /**
-   * @param solrCore te core against which we check if there has been a tragic exception
-   * @return whether this solr core has tragic exception
+   * @param solrCore the core against which we check if there has been a tragic exception
+   * @return whether this Solr core has tragic exception
+   * @see org.apache.lucene.index.IndexWriter#getTragicException()
    */
   public boolean checkTragicException(SolrCore solrCore) {
     Throwable tragicException;
@@ -1875,10 +1876,8 @@ public class CoreContainer {
       tragicException = e;
     }
 
-    if (tragicException != null) {
-      if (isZooKeeperAware()) {
-        getZkController().giveupLeadership(solrCore.getCoreDescriptor(), tragicException);
-      }
+    if (tragicException != null && isZooKeeperAware()) {
+      getZkController().giveupLeadership(solrCore.getCoreDescriptor(), tragicException);
     }
 
     return tragicException != null;