This is an automated email from the ASF dual-hosted git repository. dlmarion 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 4f5485dea6 Fixed callers of TableManager.getTableState that expected null (#5580) 4f5485dea6 is described below commit 4f5485dea6eb5bbb1e5c69898955d2a153c4621e Author: Dave Marion <dlmar...@apache.org> AuthorDate: Tue May 27 08:03:26 2025 -0400 Fixed callers of TableManager.getTableState that expected null (#5580) The change in #5422 returns TableState.UNKNOWN instead of null when the TableId does not exist or the state is not a valid value. Calling code in GCRun and TabletGroupWatcher needed to be updated to account for this change. Closes #5564 --- server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java | 2 +- .../src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java b/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java index e6e6d7cdee..98cfaf598b 100644 --- a/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java +++ b/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java @@ -342,7 +342,7 @@ public class GCRun implements GarbageCollectionEnvironment { TableId tableId = TableId.of(parts[1]); String tabletDir = parts[2]; TableState tableState = context.getTableManager().getTableState(tableId); - if (tableState != null && tableState != TableState.DELETING) { + if (tableState != TableState.UNKNOWN && tableState != TableState.DELETING) { // clone directories don't always exist if (!tabletDir.startsWith(Constants.CLONE_PREFIX)) { log.debug("{} File doesn't exist: {}", fileActionPrefix, pathToDel); diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java b/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java index 46af91364f..ef718698a1 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java @@ -60,6 +60,7 @@ import org.apache.accumulo.core.logging.ConditionalLogger.EscalatingLogger; import org.apache.accumulo.core.logging.TabletLogger; import org.apache.accumulo.core.manager.state.TabletManagement; import org.apache.accumulo.core.manager.state.TabletManagement.ManagementAction; +import org.apache.accumulo.core.manager.state.tables.TableState; import org.apache.accumulo.core.manager.thrift.ManagerGoalState; import org.apache.accumulo.core.manager.thrift.ManagerState; import org.apache.accumulo.core.manager.thrift.TabletServerStatus; @@ -484,7 +485,7 @@ abstract class TabletGroupWatcher extends AccumuloDaemonThread { final TableId tableId = tm.getTableId(); // ignore entries for tables that do not exist in zookeeper - if (manager.getTableManager().getTableState(tableId) == null) { + if (manager.getTableManager().getTableState(tableId) == TableState.UNKNOWN) { continue; }