You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2020/09/24 16:15:51 UTC

[lucene-solr] branch branch_8x updated (7eb2961 -> 38ab92d)

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

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


    from 7eb2961  SOLR-14894: ASL header
     new eca8aa8  SOLR-14828: reduce 'error' logging noise in BaseCloudSolrClient.requestWithRetryOnStaleState (#1825)
     new 38ab92d  SOLR-11167: Avoid $SOLR_STOP_WAIT use during 'bin/solr start' if $SOLR_START_WAIT is supplied. (#1913)

The 2 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:
 solr/CHANGES.txt                                               |  3 +++
 solr/bin/solr                                                  |  9 ++++++---
 solr/bin/solr.in.sh                                            | 10 +++++++---
 .../org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java |  8 ++++----
 4 files changed, 20 insertions(+), 10 deletions(-)


[lucene-solr] 01/02: SOLR-14828: reduce 'error' logging noise in BaseCloudSolrClient.requestWithRetryOnStaleState (#1825)

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

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

commit eca8aa81718d025e215b21c9e81b4b4620ec8f1e
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Thu Sep 24 17:06:45 2020 +0100

    SOLR-14828: reduce 'error' logging noise in BaseCloudSolrClient.requestWithRetryOnStaleState (#1825)
---
 .../org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
index 2f690c0..0fbd114 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
@@ -973,9 +973,6 @@ public abstract class BaseCloudSolrClient extends SolrClient {
               rootCause instanceof SocketException ||
               wasCommError(rootCause));
 
-      log.error("Request to collection {} failed due to ({}) {}, retry={} commError={} errorCode={} ",
-          inputCollections, errorCode, rootCause, retryCount, wasCommError, errorCode);
-
       if (wasCommError
           || (exc instanceof RouteException && (errorCode == 503)) // 404 because the core does not exist 503 service unavailable
         //TODO there are other reasons for 404. We need to change the solr response format from HTML to structured data to know that
@@ -997,12 +994,15 @@ public abstract class BaseCloudSolrClient extends SolrClient {
           // and we could not get any information from the server
           //it is probably not worth trying again and again because
           // the state would not have been updated
-          log.info("trying request again");
+          log.info("Request to collection {} failed due to ({}) {}, retry={} maxRetries={} commError={} errorCode={} - retrying",
+              inputCollections, errorCode, rootCause, retryCount, MAX_STALE_RETRIES, wasCommError, errorCode);
           return requestWithRetryOnStaleState(request, retryCount + 1, inputCollections);
         }
       } else {
         log.info("request was not communication error it seems");
       }
+      log.info("Request to collection {} failed due to ({}) {}, retry={} maxRetries={} commError={} errorCode={} ",
+          inputCollections, errorCode, rootCause, retryCount, MAX_STALE_RETRIES, wasCommError, errorCode);
 
       boolean stateWasStale = false;
       if (retryCount < MAX_STALE_RETRIES  &&


[lucene-solr] 02/02: SOLR-11167: Avoid $SOLR_STOP_WAIT use during 'bin/solr start' if $SOLR_START_WAIT is supplied. (#1913)

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

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

commit 38ab92da8b6649e4232e4d7fa6833b5cebdff993
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Thu Sep 24 17:08:30 2020 +0100

    SOLR-11167: Avoid $SOLR_STOP_WAIT use during 'bin/solr start' if $SOLR_START_WAIT is supplied. (#1913)
    
    Resolved Conflicts:
    	solr/CHANGES.txt
---
 solr/CHANGES.txt    |  3 +++
 solr/bin/solr       |  9 ++++++---
 solr/bin/solr.in.sh | 10 +++++++---
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f14a2f6..8b1cefa 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -22,6 +22,9 @@ New Features
 
 * SOLR-13751: Add BooleanSimilarityFactory class. (Andy Webb via Christine Poerschke)
 
+* SOLR-11167: Avoid $SOLR_STOP_WAIT use during 'bin/solr start' if $SOLR_START_WAIT is supplied.
+  (Omar Abdelnabi, Christine Poerschke)
+
 Improvements
 ---------------------
 
diff --git a/solr/bin/solr b/solr/bin/solr
index 4420786..77fa65f 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -131,6 +131,9 @@ fi
 if [ -z "$SOLR_STOP_WAIT" ]; then
   SOLR_STOP_WAIT=180
 fi
+if [ -z "$SOLR_START_WAIT" ]; then
+  SOLR_START_WAIT=$SOLR_STOP_WAIT # defaulting to $SOLR_STOP_WAIT for backwards compatibility reasons
+fi
 # test that Java exists, is executable and correct version
 JAVA_VER=$("$JAVA" -version 2>&1)
 if [[ $? -ne 0 ]] ; then
@@ -2253,7 +2256,7 @@ function start_solr() {
     fi
     # no lsof on cygwin though
     if lsof -v 2>&1 | grep -q revision; then
-      echo -n "Waiting up to $SOLR_STOP_WAIT seconds to see Solr running on port $SOLR_PORT"
+      echo -n "Waiting up to $SOLR_START_WAIT seconds to see Solr running on port $SOLR_PORT"
       # Launch in a subshell to show the spinner
       (loops=0
       while true
@@ -2261,11 +2264,11 @@ function start_solr() {
         running=$(lsof -t -PniTCP:$SOLR_PORT -sTCP:LISTEN)
         if [ -z "$running" ]; then
 	  slept=$((loops * 2))
-          if [ $slept -lt $SOLR_STOP_WAIT ]; then
+          if [ $slept -lt $SOLR_START_WAIT ]; then
             sleep 2
             loops=$[$loops+1]
           else
-            echo -e "Still not seeing Solr listening on $SOLR_PORT after $SOLR_STOP_WAIT seconds!"
+            echo -e "Still not seeing Solr listening on $SOLR_PORT after $SOLR_START_WAIT seconds!"
             tail -30 "$SOLR_LOGS_DIR/solr.log"
             exit # subshell!
           fi
diff --git a/solr/bin/solr.in.sh b/solr/bin/solr.in.sh
index 15a08d2..ddafdad 100644
--- a/solr/bin/solr.in.sh
+++ b/solr/bin/solr.in.sh
@@ -22,11 +22,15 @@
 #SOLR_JAVA_HOME=""
 
 # This controls the number of seconds that the solr script will wait for
-# Solr to stop gracefully or Solr to start.  If the graceful stop fails,
-# the script will forcibly stop Solr.  If the start fails, the script will
-# give up waiting and display the last few lines of the logfile.
+# Solr to stop gracefully.  If the graceful stop fails, the script will
+# forcibly stop Solr.
 #SOLR_STOP_WAIT="180"
 
+# This controls the number of seconds that the solr script will wait for
+# Solr to start.  If the start fails, the script will give up waiting and
+# display the last few lines of the logfile.
+#SOLR_START_WAIT="$SOLR_STOP_WAIT"
+
 # Increase Java Heap as needed to support your indexing / query needs
 #SOLR_HEAP="512m"