ctubbsii commented on code in PR #3717:
URL: https://github.com/apache/accumulo/pull/3717#discussion_r1694335311


##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -280,38 +280,42 @@ Fate<Manager> fate() {
       /* UNLOAD_ROOT_TABLET */      {O, O, O, X, X, X, X},
       /* STOP */                    {O, O, O, O, O, X, X}};
   //@formatter:on
-  synchronized void setManagerState(ManagerState newState) {
-    if (state.equals(newState)) {
+  synchronized void setManagerState(final ManagerState newState) {
+    if (state == newState) {
       return;
     }
     if (!transitionOK[state.ordinal()][newState.ordinal()]) {
       log.error("Programmer error: manager should not transition from {} to 
{}", state, newState);

Review Comment:
   @keith-turner This made sense to change to a thrown exception. I don't think 
it'd be safe to merely log an error. Even though I've never actually seen this 
error... if it happened, I think I'd prefer to see the stack trace and the 
state change to be prevented from occurring, rather than just see the error 
message and the state change occur anyway.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to