lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ans...@apache.org
Subject svn commit: r1597137 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
Date Fri, 23 May 2014 17:37:07 GMT
Author: anshum
Date: Fri May 23 17:37:06 2014
New Revision: 1597137

URL: http://svn.apache.org/r1597137
Log:
SOLR-5681: Add synchronization while printing tracking maps to a fix jenkins failure

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java?rev=1597137&r1=1597136&r2=1597137&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
(original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
Fri May 23 17:37:06 2014
@@ -2709,9 +2709,17 @@ public class OverseerCollectionProcessor
   }
 
   private void printTrackingMaps() {
-    log.debug("RunningTasks: {}", runningTasks.toString());
-    log.debug("CompletedTasks: {}", completedTasks.keySet().toString());
-    log.debug("RunningZKTasks: {}", runningZKTasks.toString());
+    if(log.isDebugEnabled()) {
+      synchronized (runningTasks) {
+        log.debug("RunningTasks: {}", runningTasks.toString());
+      }
+      synchronized (completedTasks) {
+        log.debug("CompletedTasks: {}", completedTasks.keySet().toString());
+      }
+      synchronized (runningZKTasks) {
+        log.debug("RunningZKTasks: {}", runningZKTasks.toString());
+      }
+    }
   }
 
 



Mime
View raw message