Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7F5A18F92 for ; Thu, 2 Jul 2015 20:25:28 +0000 (UTC) Received: (qmail 60675 invoked by uid 500); 2 Jul 2015 20:25:28 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 60640 invoked by uid 500); 2 Jul 2015 20:25:28 -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 60631 invoked by uid 99); 2 Jul 2015 20:25:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2015 20:25:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 72C12E364C; Thu, 2 Jul 2015 20:25:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Thu, 02 Jul 2015 20:25:28 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/8] accumulo git commit: ACCUMULO-3928 getMinCIdleThreshold might throw an exception if the table is deleted. Repository: accumulo Updated Branches: refs/heads/1.6 985c90680 -> 2fa41d009 refs/heads/1.7 00d83914e -> ba300baaa refs/heads/master 618003dde -> 978e6210e ACCUMULO-3928 getMinCIdleThreshold might throw an exception if the table is deleted. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2fa41d00 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2fa41d00 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2fa41d00 Branch: refs/heads/1.6 Commit: 2fa41d0099de0cff0722dff8e1f0340cd63777b3 Parents: 985c906 Author: Josh Elser Authored: Thu Jul 2 14:05:44 2015 -0400 Committer: Josh Elser Committed: Thu Jul 2 15:26:38 2015 -0400 ---------------------------------------------------------------------- .../tabletserver/LargestFirstMemoryManager.java | 24 +++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/2fa41d00/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java ---------------------------------------------------------------------- diff --git a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java index 1281c33..260685e 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java +++ b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map.Entry; import java.util.TreeMap; +import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.data.KeyExtent; import org.apache.accumulo.server.conf.ServerConfiguration; @@ -170,10 +171,27 @@ public class LargestFirstMemoryManager implements MemoryManager { ingestMemory += memTabletSize; if (minorCompactingSize == 0 && memTabletSize > 0) { TabletInfo tabletInfo = new TabletInfo(ts.getExtent(), memTabletSize, idleTime, timeMemoryLoad); - largestMemTablets.put(timeMemoryLoad, tabletInfo); - if (idleTime > getMinCIdleThreshold(ts.getExtent())) { - largestIdleMemTablets.put(timeMemoryLoad, tabletInfo); + try { + // If the table was deleted, getMinCIdleThreshold will throw an exception + if (idleTime > getMinCIdleThreshold(ts.getExtent())) { + largestIdleMemTablets.put(timeMemoryLoad, tabletInfo); + } + } catch (IllegalArgumentException e) { + Throwable cause = e.getCause(); + if (null != cause && cause instanceof TableNotFoundException) { + if (log.isTraceEnabled()) { + log.trace("Ignoring extent for deleted table: " + ts.getExtent()); + } + + // The table might have been deleted during the iteration of the tablets + // We just want to eat this exception, do nothing with this tablet, and continue + continue; + } + + throw e; } + // Only place the tablet into largestMemTablets map when the table still exists + largestMemTablets.put(timeMemoryLoad, tabletInfo); } compactionMemory += minorCompactingSize;