accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1245015 - /incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Date Thu, 16 Feb 2012 15:09:22 GMT
Author: ecn
Date: Thu Feb 16 15:09:22 2012
New Revision: 1245015

URL: http://svn.apache.org/viewvc?rev=1245015&view=rev
Log:
ACCUMULO-393: move set computation outside loop, added debug message

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1245015&r1=1245014&r2=1245015&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Thu Feb 16 15:09:22 2012
@@ -2005,11 +2005,14 @@ public class Master implements LiveTServ
           tserverSet.remove(server);
         }
       }
-      synchronized (badServers) {
-        Set<TServerInstance> deadBadServers = new HashSet<TServerInstance>(badServers.keySet());
-        deadBadServers.removeAll(currentServers);
-        badServers.entrySet().removeAll(deadBadServers);
+    }
+    synchronized (badServers) {
+      Set<TServerInstance> deadBadServers = new HashSet<TServerInstance>(badServers.keySet());
+      deadBadServers.removeAll(currentServers);
+      if (!badServers.isEmpty()) {
+        log.debug("Forgetting about bad servers: " + badServers);
       }
+      badServers.entrySet().removeAll(deadBadServers);
     }
     log.debug(String.format("Finished gathering information from %d servers in %.2f seconds",
result.size(), (System.currentTimeMillis() - start) / 1000.));
     return result;



Mime
View raw message