From 165a4601e2524e8f993932d8f59fbc1823f73eea Mon Sep 17 00:00:00 2001 From: Daniel Roberts ddanielr Date: Wed, 7 Oct 2026 18:09:55 +0000 Subject: [PATCH 1/2] Removes unreachable catch statement getMinCIdleThreshold never throws a TableNotFoundException as the property and map lookups will only return null. This seems like a check that predates #1899 and was just never removed. --- .../memory/LargestFirstMemoryManager.java | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java index 40a85110fe0..27d4606a6f3 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java @@ -24,7 +24,6 @@ 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.TableId; import org.apache.accumulo.core.dataImpl.KeyExtent; @@ -189,22 +188,8 @@ public List tabletsToMinorCompact(List tablets) { ingestMemory += memTabletSize; if (minorCompactingSize == 0 && memTabletSize > 0) { TabletInfo tabletInfo = new TabletInfo(tablet, memTabletSize, idleTime, timeMemoryLoad); - try { - // If the table was deleted, getMinCIdleThreshold will throw an exception - if (idleTime > getMinCIdleThreshold(tablet)) { - largestIdleMemTablets.put(timeMemoryLoad, tabletInfo); - } - } catch (IllegalArgumentException e) { - Throwable cause = e.getCause(); - if (cause != null && cause instanceof TableNotFoundException) { - log.trace("Ignoring extent for deleted table: {}", tablet); - - // 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; + if (idleTime > getMinCIdleThreshold(tablet)) { + largestIdleMemTablets.put(timeMemoryLoad, tabletInfo); } // Only place the tablet into largestMemTablets map when the table still exists largestMemTablets.put(timeMemoryLoad, tabletInfo); From 8d450ab54f496d02d94ceb77678eca4445d2910c Mon Sep 17 00:00:00 2001 From: Daniel Roberts ddanielr Date: Fri, 9 Oct 2026 16:01:40 +0000 Subject: [PATCH 2/2] Changed the error handling to handle NullPointerException instead --- .../tserver/memory/LargestFirstMemoryManager.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java index 27d4606a6f3..44ce6942e70 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/memory/LargestFirstMemoryManager.java @@ -188,8 +188,16 @@ public List tabletsToMinorCompact(List tablets) { ingestMemory += memTabletSize; if (minorCompactingSize == 0 && memTabletSize > 0) { TabletInfo tabletInfo = new TabletInfo(tablet, memTabletSize, idleTime, timeMemoryLoad); - if (idleTime > getMinCIdleThreshold(tablet)) { - largestIdleMemTablets.put(timeMemoryLoad, tabletInfo); + try { + // If the table was deleted, getMinCIdleThreshold will throw an exception + if (idleTime > getMinCIdleThreshold(tablet)) { + largestIdleMemTablets.put(timeMemoryLoad, tabletInfo); + } + } catch (NullPointerException e) { + log.trace("Table config is null. Ignoring extent for deleted table: {}", tablet); + // 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; } // Only place the tablet into largestMemTablets map when the table still exists largestMemTablets.put(timeMemoryLoad, tabletInfo);