This is an automated email from the ASF dual-hosted git repository.

cshannon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit e86af0d3bdfcdc4ea320d524f3fd20b2bc9281ab
Author: Christopher L. Shannon <cshan...@apache.org>
AuthorDate: Fri Jun 21 18:48:44 2024 -0400

    Fix MemoryStarvedScanIT (#4690)
    
    Backport a combination of #4270 and part of #4163 to exclude all tables
    in the accumulo namespace from being blocked on low memory detection
---
 .../java/org/apache/accumulo/core/metadata/AccumuloTable.java | 11 +++++++++++
 .../java/org/apache/accumulo/tserver/tablet/TabletBase.java   |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/metadata/AccumuloTable.java 
b/core/src/main/java/org/apache/accumulo/core/metadata/AccumuloTable.java
index 929444fb3c..568959d83b 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/AccumuloTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/AccumuloTable.java
@@ -18,6 +18,10 @@
  */
 package org.apache.accumulo.core.metadata;
 
+import java.util.Arrays;
+import java.util.Set;
+import java.util.stream.Collectors;
+
 import org.apache.accumulo.core.clientImpl.Namespace;
 import org.apache.accumulo.core.data.TableId;
 
@@ -43,4 +47,11 @@ public enum AccumuloTable {
     this.name = Namespace.ACCUMULO.name() + "." + name;
     this.tableId = TableId.of(id);
   }
+
+  private static final Set<TableId> ALL_IDS =
+      
Arrays.stream(values()).map(AccumuloTable::tableId).collect(Collectors.toUnmodifiableSet());
+
+  public static Set<TableId> allTableIds() {
+    return ALL_IDS;
+  }
 }
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletBase.java
 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletBase.java
index 9b0545a5c7..c7c6f9ae3d 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletBase.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletBase.java
@@ -43,6 +43,7 @@ import 
org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.YieldCallback;
 import 
org.apache.accumulo.core.iteratorsImpl.system.IterationInterruptedException;
 import org.apache.accumulo.core.iteratorsImpl.system.SourceSwitchingIterator;
+import org.apache.accumulo.core.metadata.AccumuloTable;
 import org.apache.accumulo.core.metadata.StoredTabletFile;
 import org.apache.accumulo.core.metadata.schema.DataFileValue;
 import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl;
@@ -93,7 +94,7 @@ public abstract class TabletBase {
     this.context = server.getContext();
     this.server = server;
     this.extent = extent;
-    this.isUserTable = !extent.isMeta();
+    this.isUserTable = !AccumuloTable.allTableIds().contains(extent.tableId());
 
     TableConfiguration tblConf = 
context.getTableConfiguration(extent.tableId());
     if (tblConf == null) {

Reply via email to