tboeghk commented on code in PR #2316:
URL: https://github.com/apache/solr/pull/2316#discussion_r1756930589


##########
solr/core/src/java/org/apache/solr/cloud/ReplicateFromLeader.java:
##########
@@ -133,18 +126,25 @@ public static String getCommitVersion(SolrCore solrCore) {
   }
 
   /**
-   * Determine the poll interval for replicas based on the auto soft/hard 
commit schedule
+   * Determine the poll interval for replicas based on the auto soft/hard 
commit schedule or
+   * configured commit poll interval
    *
    * @param uinfo the update handler info containing soft/hard commit 
configuration
    * @return a poll interval string representing a cadence of polling 
frequency in the form of
-   *     hh:mm:ss
+   *     hh:mm:ss, never <code>null</code>
    */
   public static String determinePollInterval(SolrConfig.UpdateHandlerInfo 
uinfo) {
     int hardCommitMaxTime = uinfo.autoCommmitMaxTime;
     int softCommitMaxTime = uinfo.autoSoftCommmitMaxTime;
     boolean hardCommitNewSearcher = uinfo.openSearcher;
-    String pollIntervalStr = null;
-    if (hardCommitMaxTime != -1) {
+    String customCommitPollInterval = uinfo.commitPollInterval;
+    String pollIntervalStr = "00:00:03";
+
+    if (System.getProperty("jetty.testMode") != null) {
+      pollIntervalStr = "00:00:01";
+    } else if (customCommitPollInterval != null) {

Review Comment:
   I'd suggest leaving it this way. I'll add a test in which we test the test 
behaviour: regardless of the arguments given, the `commitPollInterval` ist 
always `00:00:01` if the system property `jetty.testMode` is present.



-- 
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-unsubscr...@solr.apache.org

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


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

Reply via email to