ctubbsii commented on a change in pull request #2178:
URL: https://github.com/apache/accumulo/pull/2178#discussion_r657562458



##########
File path: 
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/CompactRange.java
##########
@@ -149,24 +149,27 @@ static void removeIterators(Manager environment, final 
long txid, TableId tableI
 
     ZooReaderWriter zoo = environment.getContext().getZooReaderWriter();
 
-    zoo.mutateExisting(zTablePath, currentValue -> {
-      String cvs = new String(currentValue, UTF_8);
-      String[] tokens = cvs.split(",");
-      long flushID = Long.parseLong(tokens[0]);
-
-      String txidString = String.format("%016x", txid);
+    try {
+      zoo.mutateExisting(zTablePath, currentValue -> {
+        String cvs = new String(currentValue, UTF_8);
+        String[] tokens = cvs.split(",");
+        long flushID = Long.parseLong(tokens[0]);
 
-      StringBuilder encodedIterators = new StringBuilder();
-      for (int i = 1; i < tokens.length; i++) {
-        if (tokens[i].startsWith(txidString))
-          continue;
-        encodedIterators.append(",");
-        encodedIterators.append(tokens[i]);
-      }
+        String txidString = String.format("%016x", txid);
 
-      return (Long.toString(flushID) + encodedIterators).getBytes(UTF_8);
-    });
+        StringBuilder encodedIterators = new StringBuilder();
+        for (int i = 1; i < tokens.length; i++) {
+          if (tokens[i].startsWith(txidString))
+            continue;
+          encodedIterators.append(",");
+          encodedIterators.append(tokens[i]);
+        }
 
+        return (Long.toString(flushID) + encodedIterators).getBytes(UTF_8);
+      });
+    } catch (NoNodeException ke) {
+      log.debug("Node for {} no longer exists.", tableId, ke);
+    }

Review comment:
       I checked where we `throw new AcceptableThriftTableOperationException`, 
and it seems we mostly do it in `isReady` and `call`, but in `CompactRange`, we 
do it in the constructor. There are no other places where we do it anywhere 
else (except in helper methods that get called by one of these). There are no 
places where we throw it in `undo`, so I'm fine with the code as you have it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to