accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1407489 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Date Fri, 09 Nov 2012 15:24:11 GMT
Author: ecn
Date: Fri Nov  9 15:24:11 2012
New Revision: 1407489

URL: http://svn.apache.org/viewvc?rev=1407489&view=rev
Log:
ACCUMULO-766
There is a race condition between checking for a lock
and removing the node that holds the lock.  This causes
a spurious error message in the logs (and monitor).

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1407489&r1=1407488&r2=1407489&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Fri Nov  9 15:24:11 2012
@@ -51,6 +51,7 @@ import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.KeeperException.NotEmptyException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.data.Stat;
@@ -279,7 +280,11 @@ public class LiveTServerSet implements W
             current.remove(server);
             info.cleanup();
           }
-          ZooReaderWriter.getInstance().delete(lockPath, -1);
+          try {
+            ZooReaderWriter.getInstance().delete(lockPath, -1);
+          } catch (NotEmptyException ex) {
+            // race condition: tserver created the lock after our last check; we'll see it
at the next check
+          }
         }
       }
       // log.debug("Current: " + current.keySet());



Mime
View raw message