You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2018/03/15 11:30:10 UTC

lucene-solr:branch_7_3: SOLR-11702: Minor edits to log and exception messages

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7_3 24c8ae595 -> 1afe33384


SOLR-11702: Minor edits to log and exception messages

(cherry picked from commit dab739a)

(cherry picked from commit 4b52a19)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1afe3338
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1afe3338
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1afe3338

Branch: refs/heads/branch_7_3
Commit: 1afe333844bf133538923a6ca1a3de0b2076d788
Parents: 24c8ae5
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Thu Mar 15 16:58:59 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Thu Mar 15 16:59:59 2018 +0530

----------------------------------------------------------------------
 .../org/apache/solr/cloud/ZkShardTerms.java     | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1afe3338/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java b/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
index e6db14f..55d5ace 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
@@ -296,15 +296,15 @@ public class ZkShardTerms implements AutoCloseable{
     try {
       Stat stat = zkClient.setData(znodePath, znodeData, newTerms.version, true);
       setNewTerms(new Terms(newTerms.values, stat.getVersion()));
-      log.info("Successful update terms at {} to {}", znodePath, newTerms);
+      log.info("Successful update of terms at {} to {}", znodePath, newTerms);
       return true;
     } catch (KeeperException.BadVersionException e) {
-      log.info("Failed to save terms, version is not match, retrying");
+      log.info("Failed to save terms, version is not a match, retrying");
       refreshTerms();
     } catch (KeeperException.NoNodeException e) {
       throw e;
     } catch (Exception e) {
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error save shard term for collection:" + collection, e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error while saving shard term for collection: " + collection, e);
     }
     return false;
   }
@@ -333,9 +333,9 @@ public class ZkShardTerms implements AutoCloseable{
       }
     }  catch (InterruptedException e) {
       Thread.interrupted();
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error creating shard term node in Zookeeper for collection:" + collection, e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error creating shard term node in Zookeeper for collection: " + collection, e);
     } catch (KeeperException e) {
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error creating shard term node in Zookeeper for collection:" + collection, e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error creating shard term node in Zookeeper for collection: " + collection, e);
     }
   }
 
@@ -350,9 +350,9 @@ public class ZkShardTerms implements AutoCloseable{
       newTerms = new Terms((Map<String, Long>) Utils.fromJSON(data), stat.getVersion());
     } catch (KeeperException e) {
       Thread.interrupted();
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error updating shard term for collection:" + collection, e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error updating shard term for collection: " + collection, e);
     } catch (InterruptedException e) {
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error updating shard term for collection:" + collection, e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error updating shard term for collection: " + collection, e);
     }
 
     setNewTerms(newTerms);
@@ -371,12 +371,12 @@ public class ZkShardTerms implements AutoCloseable{
         log.error("Failed watching shard term for collection: {} due to unrecoverable exception", collection, e);
         return;
       } catch (KeeperException e) {
-        log.warn("Failed watching shard term for collection:{}, retrying!", collection, e);
+        log.warn("Failed watching shard term for collection: {}, retrying!", collection, e);
         try {
           zkClient.getConnectionManager().waitForConnected(zkClient.getZkClientTimeout());
         } catch (TimeoutException te) {
           if (Thread.interrupted()) {
-            throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error watching shard term for collection:" + collection, te);
+            throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error watching shard term for collection: " + collection, te);
           }
         }
       }
@@ -401,7 +401,7 @@ public class ZkShardTerms implements AutoCloseable{
       zkClient.exists(znodePath, watcher, true);
     } catch (InterruptedException e) {
       Thread.interrupted();
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error watching shard term for collection:" + collection, e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error watching shard term for collection: " + collection, e);
     }
   }