You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by cs...@apache.org on 2024/01/20 18:51:12 UTC

(accumulo) branch elasticity updated: Fix fateRefs init check when setting the manager state (#4180)

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

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


The following commit(s) were added to refs/heads/elasticity by this push:
     new 6a3ed57136 Fix fateRefs init check when setting the manager state (#4180)
6a3ed57136 is described below

commit 6a3ed571365972f4f336d075921bf95b8897eadc
Author: Christopher L. Shannon <ch...@gmail.com>
AuthorDate: Sat Jan 20 13:51:07 2024 -0500

    Fix fateRefs init check when setting the manager state (#4180)
    
    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
---
 server/manager/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 03aa217ed1..65d54fabc7 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 @@ public class Manager extends AbstractServer
     }
 
     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.");