errose28 commented on a change in pull request #2257:
URL: https://github.com/apache/ozone/pull/2257#discussion_r638057581



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -1158,6 +1158,8 @@ public String getDatanodeRpcPort() {
    */
   @Override
   public void start() throws IOException {
+    upgradeFinalizer.runPrefinalizeStateActions(scmStorageConfig, this);

Review comment:
       This specific check could probably be moved to the constructor, but in 
general, the upgrade framework's action execution gives a fully constructed 
service to each action to inspect for conditions which may violate pre-finalize 
state. See `UpgradeFinalizer#runPrefinalizeStateActions` and its 
implementations. With the current upgrade action implementation we had to work 
around this a bit to run this action statically in init, but circumventing the 
upgrade framework and manually checking for pre-finalized state in every action 
is not recommended. In the future we may introduce a new type of pre-finalize 
validation action that can be run statically if these sort of init checks 
become common.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to