accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1453998 - /accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
Date Thu, 07 Mar 2013 18:58:01 GMT
Author: ecn
Date: Thu Mar  7 18:58:00 2013
New Revision: 1453998

URL: http://svn.apache.org/r1453998
Log:
ACCUMULO-1115 catch race condition setting properties on a table that is being deleted

Modified:
    accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java

Modified: accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java?rev=1453998&r1=1453997&r2=1453998&view=diff
==============================================================================
--- accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
(original)
+++ accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java
Thu Mar  7 18:58:00 2013
@@ -115,7 +115,15 @@ public class Config extends Test {
       Property property = tableSettings[choice].property;
       if (state.getConnector().tableOperations().exists(table)) {
         log.debug("Setting " + property.getKey() + " on " + table + " back to " + property.getDefaultValue());
-        state.getConnector().tableOperations().setProperty(table, property.getKey(), property.getDefaultValue());
+        try {
+          state.getConnector().tableOperations().setProperty(table, property.getKey(), property.getDefaultValue());
+        } catch (AccumuloException ex) {
+          if (ex.toString().contains("NoNode for")) {
+            // race condition for a table that has been deleted
+          } else {
+            throw ex;
+          }
+        }
       }
     }
     state.getMap().remove(LAST_SETTING);



Mime
View raw message