ArafatKhan2198 commented on code in PR #7452: URL: https://github.com/apache/ozone/pull/7452#discussion_r1856662339
########## hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/upgrade/ReconLayoutVersionManager.java: ########## @@ -84,26 +85,41 @@ public void finalizeLayoutFeatures(ReconStorageContainerManagerFacade scmFacade) List<ReconLayoutFeature> featuresToFinalize = getRegisteredFeatures(); for (ReconLayoutFeature feature : featuresToFinalize) { - try { - // Fetch only the FINALIZE action for the feature - Optional<ReconUpgradeAction> action = feature.getAction(ReconUpgradeAction.UpgradeActionType.FINALIZE); - if (action.isPresent()) { - // Execute the upgrade action & update the schema version in the DB - action.get().execute(scmFacade); - updateSchemaVersion(feature.getVersion()); - LOG.info("Feature versioned {} finalized successfully.", feature.getVersion()); + try (Connection connection = scmFacade.getDataSource().getConnection()) { Review Comment: @devmadhuu thanks for the comment, if the second feature fails, we will not proceed with the upgrade any further because the third feature cannot be finalized until the second feature is successfully completed. This approach is consistent with how it works in OM and SCM as well. Additionally, we have implemented safeguards in the code to ensure Recon halts the upgrade process if any errors are encountered. -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org