You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by cp...@apache.org on 2021/12/22 16:03:10 UTC

[solr] branch main updated: SOLR-15822: more include time-taken in finished-recovery-process logging (#432)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new b241890  SOLR-15822: more include time-taken in finished-recovery-process logging (#432)
b241890 is described below

commit b2418907385a927703a2fca6d358800aa154c940
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Wed Dec 22 15:59:32 2021 +0000

    SOLR-15822: more include time-taken in finished-recovery-process logging (#432)
---
 .../core/src/java/org/apache/solr/cloud/RecoveryStrategy.java | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
index 432739c..eab1ac9 100644
--- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
+++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
@@ -333,6 +333,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
   }
 
   final private void doReplicateOnlyRecovery(SolrCore core) throws InterruptedException {
+    final RTimer timer = new RTimer();
     boolean successfulRecovery = false;
 
     // if (core.getUpdateHandler().getUpdateLog() != null) {
@@ -422,7 +423,10 @@ public class RecoveryStrategy implements Runnable, Closeable {
       }
     }
     // We skip core.seedVersionBuckets(); We don't have a transaction log
-    log.info("Finished recovery process, successful=[{}]", successfulRecovery);
+    if (log.isInfoEnabled()) {
+      log.info("Finished recovery process, successful=[{}] msTimeTaken={}", successfulRecovery, timer.getTime());
+    }
+
   }
 
   /**
@@ -480,6 +484,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
 
   // TODO: perhaps make this grab a new core each time through the loop to handle core reloads?
   public final void doSyncOrReplicateRecovery(SolrCore core) throws Exception {
+    final RTimer timer = new RTimer();
     boolean successfulRecovery = false;
 
     UpdateLog ulog;
@@ -728,7 +733,9 @@ public class RecoveryStrategy implements Runnable, Closeable {
       core.seedVersionBuckets();
     }
 
-    log.info("Finished recovery process, successful=[{}]", successfulRecovery);
+    if (log.isInfoEnabled()) {
+      log.info("Finished recovery process, successful=[{}] msTimeTaken={}", successfulRecovery, timer.getTime());
+    }
   }
 
   /**