You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sodonnel (via GitHub)" <gi...@apache.org> on 2026/03/06 11:46:40 UTC
Re: [PR] HDDS-14570. SCM should finalize all versions with one Ratis request [ozone]
sodonnel commented on code in PR #9715:
URL: https://github.com/apache/ozone/pull/9715#discussion_r2895353603
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/upgrade/SCMUpgradeFinalizer.java:
##########
@@ -78,14 +78,28 @@ public void preFinalizeUpgrade(SCMUpgradeFinalizationContext context)
@Override
public void finalizeLayoutFeature(LayoutFeature lf,
SCMUpgradeFinalizationContext context) throws UpgradeException {
- // Run upgrade actions, update VERSION file, and update layout version in
- // DB.
+ throw new UnsupportedOperationException("FinalizeLayoutFeature is not supported in this implemementation. " +
+ "Please use finalizeLayoutFeatures instead.");
+ }
+
+ @Override
+ public void finalizeLayoutFeatures(Iterable<LayoutFeature> features, SCMUpgradeFinalizationContext context)
+ throws UpgradeException {
+ int firstLv = -1;
+ int lastLv = -1;
+ for (LayoutFeature lf : features) {
+ if (firstLv == -1) {
+ firstLv = lf.layoutVersion();
+ }
+ lastLv = lf.layoutVersion();
Review Comment:
It was intentionally like this, as we want to store the first and last value in the iterator. However I have refactored this a bit in the latest version as we don't actually need the firstLv to be passed through.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org