yandrey321 commented on code in PR #9715:
URL: https://github.com/apache/ozone/pull/9715#discussion_r2799618518
##########
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();
+ }
try {
- context.getFinalizationStateManager()
- .finalizeLayoutFeature(lf.layoutVersion());
+ if (firstLv > -1) {
Review Comment:
should it also check (lastLv > firstLv)?
--
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]