You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/10/31 21:57:50 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1405: Made tablet assignment wait on upgrade.

ctubbsii commented on a change in pull request #1405: Made tablet assignment wait on upgrade.
URL: https://github.com/apache/accumulo/pull/1405#discussion_r341382290
 
 

 ##########
 File path: server/master/src/main/java/org/apache/accumulo/master/Master.java
 ##########
 @@ -268,7 +269,14 @@ synchronized void setMasterState(MasterState newState) {
     }
   }
 
-  private UpgradeCoordinator upgradeCoordinator;
+  private volatile UpgradeCoordinator upgradeCoordinator;
+
+  private UpgradeStatus getUpgradeStatus() {
+    if (upgradeCoordinator == null)
+      return UpgradeStatus.INITIAL;
+    return upgradeCoordinator.getStatus();
+  }
+
 
 Review comment:
   Instead of relying on null, we should just set it to something that has a status of INITIAL instead. Then this variable can be final, and this method can be removed/inlined.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services