You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "aparnasuresh85 (via GitHub)" <gi...@apache.org> on 2023/12/18 16:35:04 UTC

[PR] SOLR-17106: LBSolrClient - Make zombie ping checks configurable [solr]

aparnasuresh85 opened a new pull request, #2160:
URL: https://github.com/apache/solr/pull/2160

   https://issues.apache.org/jira/browse/SOLR-17106
   
   <!--
   _(If you are a project committer then you may remove some/all of the following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system for Solr:
   
   * https://issues.apache.org/jira/projects/SOLR
   
   For something minor (i.e. that wouldn't be worth putting in release notes), you can skip JIRA. 
   To create a Jira issue, you will need to create an account there first.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * SOLR-####: <short description of problem or changes>
   
   SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
   
   
   # Description
   
   Please provide a short description of the changes you're making with this pull request.
   The issue involves scalability challenges in SolrJ's LBSolrClient when a pod with numerous cores experiences connectivity problems. The "zombie" ping checking mechanism, operating on a core basis, becomes a bottleneck during distributed search on a massive multi shard collection. Threads attempting to reach unhealthy cores contribute to a high computational load, causing performance issues. 
   
   LBSolrClient could be configured to disable zombie "ping" checks, but retain zombie tracking. Once a replica/endpoint is identified as a zombie, it could be held in zombie state for X seconds, before being released - hoping that by this timeframe ZK would be updated to mark this endpoint DOWN or the pod is back up and CloudSolrClient would avoid querying it. In any event, only 1 failed query would be needed to send the server back to zombie state.
   
   Dev list thread: https://lists.apache.org/thread/f0zfmpg0t48xrtppyfsmfc5ltzsq2qqh
   
   
   # Solution
   
   Please provide a short description of the approach taken to implement your solution.
   
   Modified the code to make zombie ping checking configurable through a new property named "enableZombiePingChecks." When set to true, the system is designed to periodically send zombie ping requests every zombiePingIntervalMillis. Conversely, setting it to false disables zombie pings and instead monitors the "zombieServers" every zombieStateMonitoringIntervalMillis. This monitoring identifies replicas or endpoints that have spent at least minZombieReleaseTimeMillis as zombies, subsequently releasing them from the zombie state and adding them back to the alive set.
   
   The default configuration for zombiePingIntervalMillis remains at 1 minute, while zombieStateMonitoringIntervalMillis is currently set to 5 seconds, and minZombieReleaseTimeMillis is configured at 10 seconds.
   
   Corresponding tests in TestLBHttp2SolrClient and TestLBHttpSolrClient have been adjusted accordingly.
   
   # Tests
   
   Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
   Slight refactoring in TestLBHttp2SolrClient and TestLBHttpSolrClient, added a new test testReliabilityWithoutZombiePingChecks in TestLBHttp2SolrClient. All tests pass.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [x] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


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

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

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


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


Re: [PR] SOLR-17106: LBSolrClient - Make zombie ping checks configurable [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #2160:
URL: https://github.com/apache/solr/pull/2160#discussion_r1601881299


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -480,35 +488,70 @@ public RequestWriter getRequestWriter() {
     return requestWriter;
   }
 
+  private boolean isServerAlive(ServerWrapper zombieServer)
+      throws SolrServerException, IOException {
+    if (null == aliveCheckQuery) {
+      log.debug("Assuming success because aliveCheckQuery is null");
+      return true;
+    }
+    log.debug("Running ping check on server " + zombieServer.getBaseUrl());
+    QueryRequest queryRequest = new QueryRequest(aliveCheckQuery);
+    queryRequest.setBasePath(zombieServer.baseUrl);
+    return queryRequest.process(getClient(zombieServer.getBaseUrl())).getStatus() == 0;
+  }
+
+  private void handleServerBackUp(ServerWrapper zombieServer) {
+    // server has come back up.
+    // make sure to remove from zombies before adding to alive to avoid a race condition
+    // where another thread could mark it down, move it back to zombie, and then we delete
+    // from zombie and lose it forever.
+    ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
+    if (wrapper != null) {
+      wrapper.failedPings = 0;
+      if (wrapper.standard) {
+        addToAlive(wrapper);
+      }
+    } else {
+      // something else already moved the server from zombie to alive
+    }
+  }
+
+  private void handleServerDown(ServerWrapper zombieServer) {
+    // Expected. The server is still down.
+    zombieServer.failedPings++;
+    zombieServer.skipAliveCheckIters = this.aliveCheckSkipIters;
+
+    // If the server doesn't belong in the standard set belonging to this load balancer
+    // then simply drop it after a certain number of failed pings.
+    if (!zombieServer.standard && zombieServer.failedPings >= NONSTANDARD_PING_LIMIT) {
+      zombieServers.remove(zombieServer.getBaseUrl());
+    }
+  }
+
   private void checkAZombieServer(ServerWrapper zombieServer) {
     try {
-      QueryRequest queryRequest = new QueryRequest(solrQuery);
-      queryRequest.setBasePath(zombieServer.baseUrl);
-      QueryResponse resp = queryRequest.process(getClient(zombieServer.getBaseUrl()));
-      if (resp.getStatus() == 0) {
-        // server has come back up.
-        // make sure to remove from zombies before adding to alive to avoid a race condition
-        // where another thread could mark it down, move it back to zombie, and then we delete
-        // from zombie and lose it forever.
-        ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
-        if (wrapper != null) {
-          wrapper.failedPings = 0;
-          if (wrapper.standard) {
-            addToAlive(wrapper);
-          }
-        } else {
-          // something else already moved the server from zombie to alive
-        }
+      // push back on liveness checks only every Nth iteration
+      if (zombieServer.skipAliveCheckIters > 0) {
+        log.debug(
+            "Skipping liveness check for server "
+                + zombieServer.getBaseUrl()
+                + " because skipAliveCheckIters = "
+                + zombieServer.skipAliveCheckIters);
+        zombieServer.skipAliveCheckIters--;
+        return;
       }
-    } catch (Exception e) {
-      // Expected. The server is still down.
-      zombieServer.failedPings++;
 
-      // If the server doesn't belong in the standard set belonging to this load balancer
-      // then simply drop it after a certain number of failed pings.
-      if (!zombieServer.standard && zombieServer.failedPings >= NONSTANDARD_PING_LIMIT) {
-        zombieServers.remove(zombieServer.getBaseUrl());
+      if (isServerAlive(zombieServer)) {
+        log.debug("Successfully pinged server " + zombieServer.getBaseUrl() + ", marking it alive");

Review Comment:
   Always use "{}" templates in SLF4J



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

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

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


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


Re: [PR] SOLR-17106: LBSolrClient - Make zombie ping checks configurable [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #2160:
URL: https://github.com/apache/solr/pull/2160#issuecomment-2112567149

   Aparna, are we just missing use of EnvUtils here?  I know we've taken this change as-is (in our fork) but even we don't have that, thus it's hard to actually _use_ the changes configured here.


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

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

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


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


Re: [PR] SOLR-17106: LBSolrClient - Make zombie ping checks configurable [solr]

Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #2160:
URL: https://github.com/apache/solr/pull/2160#discussion_r1601674762


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java:
##########
@@ -281,6 +298,37 @@ public LBHttp2SolrClient.Builder setAliveCheckInterval(int aliveCheckInterval, T
       return this;
     }
 
+    /**
+     * Positive values can be used to ensure that the liveness checks for a given URL will only be
+     * run every "Nth" iteration of the setAliveCheckInterval
+     *
+     * @param aliveCheckSkipIters, number of iterations to skip, an int value *

Review Comment:
   did this mean to have a trailing `*`?



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -480,35 +488,70 @@ public RequestWriter getRequestWriter() {
     return requestWriter;
   }
 
+  private boolean isServerAlive(ServerWrapper zombieServer)
+      throws SolrServerException, IOException {
+    if (null == aliveCheckQuery) {
+      log.debug("Assuming success because aliveCheckQuery is null");
+      return true;
+    }
+    log.debug("Running ping check on server " + zombieServer.getBaseUrl());
+    QueryRequest queryRequest = new QueryRequest(aliveCheckQuery);
+    queryRequest.setBasePath(zombieServer.baseUrl);
+    return queryRequest.process(getClient(zombieServer.getBaseUrl())).getStatus() == 0;
+  }
+
+  private void handleServerBackUp(ServerWrapper zombieServer) {
+    // server has come back up.
+    // make sure to remove from zombies before adding to alive to avoid a race condition
+    // where another thread could mark it down, move it back to zombie, and then we delete
+    // from zombie and lose it forever.
+    ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
+    if (wrapper != null) {
+      wrapper.failedPings = 0;
+      if (wrapper.standard) {
+        addToAlive(wrapper);
+      }
+    } else {
+      // something else already moved the server from zombie to alive
+    }
+  }
+
+  private void handleServerDown(ServerWrapper zombieServer) {
+    // Expected. The server is still down.
+    zombieServer.failedPings++;
+    zombieServer.skipAliveCheckIters = this.aliveCheckSkipIters;
+
+    // If the server doesn't belong in the standard set belonging to this load balancer
+    // then simply drop it after a certain number of failed pings.
+    if (!zombieServer.standard && zombieServer.failedPings >= NONSTANDARD_PING_LIMIT) {
+      zombieServers.remove(zombieServer.getBaseUrl());
+    }
+  }
+
   private void checkAZombieServer(ServerWrapper zombieServer) {
     try {
-      QueryRequest queryRequest = new QueryRequest(solrQuery);
-      queryRequest.setBasePath(zombieServer.baseUrl);
-      QueryResponse resp = queryRequest.process(getClient(zombieServer.getBaseUrl()));
-      if (resp.getStatus() == 0) {
-        // server has come back up.
-        // make sure to remove from zombies before adding to alive to avoid a race condition
-        // where another thread could mark it down, move it back to zombie, and then we delete
-        // from zombie and lose it forever.
-        ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
-        if (wrapper != null) {
-          wrapper.failedPings = 0;
-          if (wrapper.standard) {
-            addToAlive(wrapper);
-          }
-        } else {
-          // something else already moved the server from zombie to alive
-        }
+      // push back on liveness checks only every Nth iteration
+      if (zombieServer.skipAliveCheckIters > 0) {
+        log.debug(
+            "Skipping liveness check for server "
+                + zombieServer.getBaseUrl()
+                + " because skipAliveCheckIters = "
+                + zombieServer.skipAliveCheckIters);
+        zombieServer.skipAliveCheckIters--;
+        return;
       }
-    } catch (Exception e) {
-      // Expected. The server is still down.
-      zombieServer.failedPings++;
 
-      // If the server doesn't belong in the standard set belonging to this load balancer
-      // then simply drop it after a certain number of failed pings.
-      if (!zombieServer.standard && zombieServer.failedPings >= NONSTANDARD_PING_LIMIT) {
-        zombieServers.remove(zombieServer.getBaseUrl());
+      if (isServerAlive(zombieServer)) {
+        log.debug("Successfully pinged server " + zombieServer.getBaseUrl() + ", marking it alive");

Review Comment:
   and the check



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java:
##########
@@ -266,19 +280,49 @@ public Builder withBaseSolrUrls(String... solrUrls) {
 
     /**
      * LBHttpSolrServer keeps pinging the dead servers at fixed interval to find if it is alive. Use
-     * this to set that interval
-     *
-     * @param aliveCheckInterval time in milliseconds
+     * this to set that interval.
+     * @param aliveCheckInterval how often to ping for aliveness
+     * @see #setAliveCheckSkipIters(int)
+     * @see #setAliveCheckQuery(SolrQuery)
      */
     public Builder setAliveCheckInterval(int aliveCheckInterval) {
       if (aliveCheckInterval <= 0) {
         throw new IllegalArgumentException(
-            "Alive check interval must be " + "positive, specified value = " + aliveCheckInterval);
+            "Alive check interval must be positive, specified value = " + aliveCheckInterval);
       }
       this.aliveCheckInterval = aliveCheckInterval;
       return this;
     }
 
+    /**
+     * Positive values can be used to ensure that the liveness checks for a given URL will only be
+     * run every "Nth" iteration of the setAliveCheckInterval
+     * @param aliveCheckSkipIters, number of iterations to skip, an int value *
+     * @see #setAliveCheckInterval(int)
+     * @see #setAliveCheckQuery(SolrQuery)
+     */
+    public Builder setAliveCheckSkipIters(int aliveCheckSkipIters) {
+      if (aliveCheckSkipIters < 0) {
+        throw new IllegalArgumentException(
+            ("Alive Check Skip Iterations must be positive, specified value = "

Review Comment:
   and the doubled (



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -79,24 +81,27 @@ public abstract class LBSolrClient extends SolrClient {
 
   protected long aliveCheckIntervalMillis =
       TimeUnit.MILLISECONDS.convert(60, TimeUnit.SECONDS); // 1 minute between checks
+  protected int aliveCheckSkipIters = 0;

Review Comment:
   Do we use the short hand `Iters` in lots of places?   If not, I like the full `Iteration` as just one less thing to read.



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -480,35 +488,70 @@ public RequestWriter getRequestWriter() {
     return requestWriter;
   }
 
+  private boolean isServerAlive(ServerWrapper zombieServer)
+      throws SolrServerException, IOException {
+    if (null == aliveCheckQuery) {
+      log.debug("Assuming success because aliveCheckQuery is null");
+      return true;
+    }
+    log.debug("Running ping check on server " + zombieServer.getBaseUrl());

Review Comment:
   likewise on the check?



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -480,35 +488,70 @@ public RequestWriter getRequestWriter() {
     return requestWriter;
   }
 
+  private boolean isServerAlive(ServerWrapper zombieServer)
+      throws SolrServerException, IOException {
+    if (null == aliveCheckQuery) {
+      log.debug("Assuming success because aliveCheckQuery is null");
+      return true;
+    }
+    log.debug("Running ping check on server " + zombieServer.getBaseUrl());
+    QueryRequest queryRequest = new QueryRequest(aliveCheckQuery);
+    queryRequest.setBasePath(zombieServer.baseUrl);
+    return queryRequest.process(getClient(zombieServer.getBaseUrl())).getStatus() == 0;
+  }
+
+  private void handleServerBackUp(ServerWrapper zombieServer) {
+    // server has come back up.
+    // make sure to remove from zombies before adding to alive to avoid a race condition
+    // where another thread could mark it down, move it back to zombie, and then we delete
+    // from zombie and lose it forever.
+    ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
+    if (wrapper != null) {
+      wrapper.failedPings = 0;
+      if (wrapper.standard) {
+        addToAlive(wrapper);
+      }
+    } else {
+      // something else already moved the server from zombie to alive
+    }
+  }
+
+  private void handleServerDown(ServerWrapper zombieServer) {
+    // Expected. The server is still down.
+    zombieServer.failedPings++;
+    zombieServer.skipAliveCheckIters = this.aliveCheckSkipIters;
+
+    // If the server doesn't belong in the standard set belonging to this load balancer
+    // then simply drop it after a certain number of failed pings.
+    if (!zombieServer.standard && zombieServer.failedPings >= NONSTANDARD_PING_LIMIT) {
+      zombieServers.remove(zombieServer.getBaseUrl());
+    }
+  }
+
   private void checkAZombieServer(ServerWrapper zombieServer) {
     try {
-      QueryRequest queryRequest = new QueryRequest(solrQuery);
-      queryRequest.setBasePath(zombieServer.baseUrl);
-      QueryResponse resp = queryRequest.process(getClient(zombieServer.getBaseUrl()));
-      if (resp.getStatus() == 0) {
-        // server has come back up.
-        // make sure to remove from zombies before adding to alive to avoid a race condition
-        // where another thread could mark it down, move it back to zombie, and then we delete
-        // from zombie and lose it forever.
-        ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
-        if (wrapper != null) {
-          wrapper.failedPings = 0;
-          if (wrapper.standard) {
-            addToAlive(wrapper);
-          }
-        } else {
-          // something else already moved the server from zombie to alive
-        }
+      // push back on liveness checks only every Nth iteration
+      if (zombieServer.skipAliveCheckIters > 0) {
+        log.debug(

Review Comment:
   the ifDebugEnabled check



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -480,35 +488,70 @@ public RequestWriter getRequestWriter() {
     return requestWriter;
   }
 
+  private boolean isServerAlive(ServerWrapper zombieServer)
+      throws SolrServerException, IOException {
+    if (null == aliveCheckQuery) {
+      log.debug("Assuming success because aliveCheckQuery is null");
+      return true;
+    }
+    log.debug("Running ping check on server " + zombieServer.getBaseUrl());
+    QueryRequest queryRequest = new QueryRequest(aliveCheckQuery);
+    queryRequest.setBasePath(zombieServer.baseUrl);
+    return queryRequest.process(getClient(zombieServer.getBaseUrl())).getStatus() == 0;
+  }
+
+  private void handleServerBackUp(ServerWrapper zombieServer) {
+    // server has come back up.
+    // make sure to remove from zombies before adding to alive to avoid a race condition
+    // where another thread could mark it down, move it back to zombie, and then we delete
+    // from zombie and lose it forever.
+    ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
+    if (wrapper != null) {
+      wrapper.failedPings = 0;
+      if (wrapper.standard) {
+        addToAlive(wrapper);
+      }
+    } else {
+      // something else already moved the server from zombie to alive
+    }
+  }
+
+  private void handleServerDown(ServerWrapper zombieServer) {
+    // Expected. The server is still down.
+    zombieServer.failedPings++;
+    zombieServer.skipAliveCheckIters = this.aliveCheckSkipIters;
+
+    // If the server doesn't belong in the standard set belonging to this load balancer
+    // then simply drop it after a certain number of failed pings.
+    if (!zombieServer.standard && zombieServer.failedPings >= NONSTANDARD_PING_LIMIT) {
+      zombieServers.remove(zombieServer.getBaseUrl());
+    }
+  }
+
   private void checkAZombieServer(ServerWrapper zombieServer) {
     try {
-      QueryRequest queryRequest = new QueryRequest(solrQuery);
-      queryRequest.setBasePath(zombieServer.baseUrl);
-      QueryResponse resp = queryRequest.process(getClient(zombieServer.getBaseUrl()));
-      if (resp.getStatus() == 0) {
-        // server has come back up.
-        // make sure to remove from zombies before adding to alive to avoid a race condition
-        // where another thread could mark it down, move it back to zombie, and then we delete
-        // from zombie and lose it forever.
-        ServerWrapper wrapper = zombieServers.remove(zombieServer.getBaseUrl());
-        if (wrapper != null) {
-          wrapper.failedPings = 0;
-          if (wrapper.standard) {
-            addToAlive(wrapper);
-          }
-        } else {
-          // something else already moved the server from zombie to alive
-        }
+      // push back on liveness checks only every Nth iteration
+      if (zombieServer.skipAliveCheckIters > 0) {
+        log.debug(
+            "Skipping liveness check for server "
+                + zombieServer.getBaseUrl()
+                + " because skipAliveCheckIters = "
+                + zombieServer.skipAliveCheckIters);
+        zombieServer.skipAliveCheckIters--;
+        return;
       }
-    } catch (Exception e) {
-      // Expected. The server is still down.
-      zombieServer.failedPings++;
 
-      // If the server doesn't belong in the standard set belonging to this load balancer
-      // then simply drop it after a certain number of failed pings.
-      if (!zombieServer.standard && zombieServer.failedPings >= NONSTANDARD_PING_LIMIT) {
-        zombieServers.remove(zombieServer.getBaseUrl());
+      if (isServerAlive(zombieServer)) {
+        log.debug("Successfully pinged server " + zombieServer.getBaseUrl() + ", marking it alive");
+        handleServerBackUp(zombieServer);
       }
+
+    } catch (Exception e) {
+      log.debug(

Review Comment:
   and the check!   I think the whole check thing is werid that it's not just part of log.debug!



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -79,24 +81,27 @@ public abstract class LBSolrClient extends SolrClient {
 
   protected long aliveCheckIntervalMillis =
       TimeUnit.MILLISECONDS.convert(60, TimeUnit.SECONDS); // 1 minute between checks
+  protected int aliveCheckSkipIters = 0;

Review Comment:
   maybe just a personal thing though.



##########
solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttp2SolrClient.java:
##########
@@ -205,16 +202,31 @@ public void testTwoServers() throws Exception {
     }
   }
 
-  public void testReliability() throws Exception {
+  @LogLevel("org.apache.solr.client.solrj.impl.LBSolrClient=DEBUG")

Review Comment:
   ah, I think I see why you have it from looking lower down in the LogReliablityTestSetup



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java:
##########
@@ -266,19 +280,49 @@ public Builder withBaseSolrUrls(String... solrUrls) {
 
     /**
      * LBHttpSolrServer keeps pinging the dead servers at fixed interval to find if it is alive. Use
-     * this to set that interval
-     *
-     * @param aliveCheckInterval time in milliseconds
+     * this to set that interval.
+     * @param aliveCheckInterval how often to ping for aliveness
+     * @see #setAliveCheckSkipIters(int)
+     * @see #setAliveCheckQuery(SolrQuery)
      */
     public Builder setAliveCheckInterval(int aliveCheckInterval) {
       if (aliveCheckInterval <= 0) {
         throw new IllegalArgumentException(
-            "Alive check interval must be " + "positive, specified value = " + aliveCheckInterval);
+            "Alive check interval must be positive, specified value = " + aliveCheckInterval);
       }
       this.aliveCheckInterval = aliveCheckInterval;
       return this;
     }
 
+    /**
+     * Positive values can be used to ensure that the liveness checks for a given URL will only be
+     * run every "Nth" iteration of the setAliveCheckInterval
+     * @param aliveCheckSkipIters, number of iterations to skip, an int value *

Review Comment:
   again the trailing `*`



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java:
##########
@@ -281,6 +298,37 @@ public LBHttp2SolrClient.Builder setAliveCheckInterval(int aliveCheckInterval, T
       return this;
     }
 
+    /**
+     * Positive values can be used to ensure that the liveness checks for a given URL will only be
+     * run every "Nth" iteration of the setAliveCheckInterval
+     *
+     * @param aliveCheckSkipIters, number of iterations to skip, an int value *
+     * @see #setAliveCheckInterval(int, TimeUnit)
+     * @see #setAliveCheckQuery(SolrQuery)
+     */
+    public LBHttp2SolrClient.Builder setAliveCheckSkipIters(int aliveCheckSkipIters) {
+      if (aliveCheckSkipIters < 0) {
+        throw new IllegalArgumentException(
+            ("Alive Check Skip Iterations must be positive, specified value = "

Review Comment:
   do we need the doubled `(` here?   Maybe for string parsing?



##########
solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttp2SolrClient.java:
##########
@@ -205,16 +202,31 @@ public void testTwoServers() throws Exception {
     }
   }
 
-  public void testReliability() throws Exception {
+  @LogLevel("org.apache.solr.client.solrj.impl.LBSolrClient=DEBUG")

Review Comment:
   is this needed to make the test pass, or from working on the code?  the @logLevel?



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java:
##########
@@ -480,35 +488,70 @@ public RequestWriter getRequestWriter() {
     return requestWriter;
   }
 
+  private boolean isServerAlive(ServerWrapper zombieServer)
+      throws SolrServerException, IOException {
+    if (null == aliveCheckQuery) {

Review Comment:
   I think we have normally a check to see if we are in debug mode before calling the `.debug`



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

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

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


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


Re: [PR] SOLR-17106: LBSolrClient - Make zombie ping checks configurable [solr]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2160:
URL: https://github.com/apache/solr/pull/2160#issuecomment-2244009807

   This PR has had no activity for 60 days and is now labeled as stale.  Any new activity or converting it to draft will remove the stale label.  To attract more reviewers, please tag people who might be familiar with the code area and/or notify the dev@solr.apache.org mailing list.  Thank you for your contribution!


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

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

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


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


Re: [PR] SOLR-17106: LBSolrClient - Make zombie ping checks configurable [solr]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2160:
URL: https://github.com/apache/solr/pull/2160#issuecomment-2111347606

   This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution!


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

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

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


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