You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/03/07 19:58:01 UTC

svn commit: r1453998 - /accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java

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);