From c371ee622c447b86facd60ef4659085313ada508 Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Sat, 20 Jan 2024 12:29:32 -0500 Subject: [PATCH] Fix fateRefs init check when setting the manager state As part of #4133 the null check for fateRef inside of setManagerState() method in the Manager was inadvertently changed to check if the map size was non empty but the actual check should be that it's null which means not initialized. The map will never be non empty if it is set. This restores the previous check that used to check for a null ref --- .../src/main/java/org/apache/accumulo/manager/Manager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java index 03aa217ed1a..65d54fabc70 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java @@ -334,7 +334,7 @@ synchronized void setManagerState(ManagerState newState) { } if (oldState != newState && (newState == ManagerState.NORMAL)) { - if (!getFateRefs().isEmpty()) { + if (fateRefs.get() != null) { throw new IllegalStateException("Access to Fate should not have been" + " initialized prior to the Manager finishing upgrades. Please save" + " all logs and file a bug.");