You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "cpoerschke (via GitHub)" <gi...@apache.org> on 2024/03/08 18:44:06 UTC

Re: [PR] [SOLR-17187] Add possibility to supply a custom commitPollInterval for TLOG/PULL replicas [solr]

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


##########
solr/core/src/java/org/apache/solr/cloud/ReplicateFromLeader.java:
##########
@@ -74,14 +74,18 @@ public void startReplication(boolean switchTransactionLog) {
               "SolrCore not found:" + coreName + " in " + CloudUtil.getLoadedCoreNamesAsString(cc));
         }
       }
+
       SolrConfig.UpdateHandlerInfo uinfo = core.getSolrConfig().getUpdateHandlerInfo();
+      String customPollInterval =
+          core.getSolrConfig().get("updateHandler").get("commitPollInterval").txt();

Review Comment:
   implementation detail: might a `UpdateHandlerInfo.commitPollInterval` member be an alternative?



##########
solr/core/src/java/org/apache/solr/cloud/ReplicateFromLeader.java:
##########
@@ -74,14 +74,18 @@ public void startReplication(boolean switchTransactionLog) {
               "SolrCore not found:" + coreName + " in " + CloudUtil.getLoadedCoreNamesAsString(cc));
         }
       }
+
       SolrConfig.UpdateHandlerInfo uinfo = core.getSolrConfig().getUpdateHandlerInfo();
+      String customPollInterval =
+          core.getSolrConfig().get("updateHandler").get("commitPollInterval").txt();
       String pollIntervalStr = "00:00:03";
+      String calculatedPollIntervalString = determinePollInterval(uinfo);
+
       if (System.getProperty("jetty.testMode") != null) {
         pollIntervalStr = "00:00:01";
-      }
-
-      String calculatedPollIntervalString = determinePollInterval(uinfo);
-      if (calculatedPollIntervalString != null) {
+      } else if (customPollInterval != null) {
+        pollIntervalStr = customPollInterval;
+      } else if (calculatedPollIntervalString != null) {
         pollIntervalStr = calculatedPollIntervalString;
       }
       log.info("Will start replication from leader with poll interval: {}", pollIntervalStr);

Review Comment:
   logging: wondering about somewhere (not necessarily here) recording the custom interval and what it would have been otherwise.



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