sodonnel commented on code in PR #9715:
URL: https://github.com/apache/ozone/pull/9715#discussion_r2960321804


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/upgrade/FinalizationStateManagerImpl.java:
##########
@@ -99,8 +99,11 @@ public void addFinalizingMark() throws IOException {
   }
 
   @Override
-  public void finalizeLayoutFeature(Integer layoutVersion) throws IOException {
-    finalizeLayoutFeatureLocal(layoutVersion);
+  public void finalizeLayoutFeatures(Integer toVersion) throws IOException {
+    int startLayoutVersion = versionManager.getMetadataLayoutVersion() + 1;

Review Comment:
   The current metaLayoutVersion reported by the versionManager is the last 
version that was finalized. So when we get a `finalizeLayoutFeatures` request 
we have to finalize all features from "current + 1" to the `toVersion` passed. 
That is why we get MetaLayoutVersion + 1.
   
   In a future change, we have some logic to apply to the toVersion - eg if the 
toVersion is greater than our `softwareLayoutVersion` it means this software is 
an unexpected version and it should abort. But as the current implementation 
doesn't do that, we are keeping it as it was for now, and will add that when 
its all simplified.
   
   Otherwise we could just drop the toVersion parameter and just finalize 
everything that isn't already finalized.
   
   Does that answer your question?



-- 
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]


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

Reply via email to