keith-turner commented on code in PR #5530:
URL: https://github.com/apache/accumulo/pull/5530#discussion_r2076270414


##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -1918,10 +1918,20 @@ public boolean isUpgrading() {
   }
 
   void initializeBalancer() {
-    var localTabletBalancer = 
Property.createInstanceFromPropertyName(getConfiguration(),
-        Property.MANAGER_TABLET_BALANCER, TabletBalancer.class, new 
TableLoadBalancer());
-    localTabletBalancer.init(balancerEnvironment);
-    tabletBalancer = localTabletBalancer;
+    try {
+      getContext().getPropStore().getCache().removeAll();
+      getConfiguration().invalidateCache();
+      log.debug("Attempting to reinitialize balancer using class {}", 
getConfiguration().get(Property.MANAGER_TABLET_BALANCER));
+      var localTabletBalancer = 
Property.createInstanceFromPropertyName(getConfiguration(),
+              Property.MANAGER_TABLET_BALANCER, TabletBalancer.class, new 
DoNothingBalancer());
+      localTabletBalancer.init(balancerEnvironment);

Review Comment:
   When running the new IT found that if init() threw an exception that it 
would not fall back to the DoNothingBalancer, so refactored this code to get 
the fallback working.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to