You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2021/06/24 10:36:31 UTC
[accumulo] branch main updated: Catch NoNodeException in
CompactRange undo (#2178)
This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 04a4a7b Catch NoNodeException in CompactRange undo (#2178)
04a4a7b is described below
commit 04a4a7bcb5f6e7d38829c270b46c1484e4b42650
Author: Mike Miller <mm...@apache.org>
AuthorDate: Thu Jun 24 06:36:22 2021 -0400
Catch NoNodeException in CompactRange undo (#2178)
* Fixes #1919
* It is possible for a compaction to run after a table is deleted so
catch the exception and print to debug, avoiding the FATE warning
---
.../manager/tableOps/compact/CompactRange.java | 33 ++++++++++++----------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/CompactRange.java b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/CompactRange.java
index dfa52c4..6d94c52 100644
--- a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/CompactRange.java
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/CompactRange.java
@@ -149,24 +149,27 @@ public class CompactRange extends ManagerRepo {
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);
+ }
}
@Override