From commits-return-25055-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Thu Jun 24 10:36:33 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id DC180180674 for ; Thu, 24 Jun 2021 12:36:32 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 2067B430D1 for ; Thu, 24 Jun 2021 10:36:32 +0000 (UTC) Received: (qmail 3989 invoked by uid 500); 24 Jun 2021 10:36:31 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 3971 invoked by uid 99); 24 Jun 2021 10:36:31 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2021 10:36:31 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8F0E6821E0; Thu, 24 Jun 2021 10:36:31 +0000 (UTC) Date: Thu, 24 Jun 2021 10:36:31 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch main updated: Catch NoNodeException in CompactRange undo (#2178) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <162453099133.1004.17800384810614083696@gitbox.apache.org> From: mmiller@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Oldrev: 89b411c391675cb3f1faed83f2dd4451b2ac6d12 X-Git-Newrev: 04a4a7bcb5f6e7d38829c270b46c1484e4b42650 X-Git-Rev: 04a4a7bcb5f6e7d38829c270b46c1484e4b42650 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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