errose28 commented on code in PR #10543:
URL: https://github.com/apache/ozone/pull/10543#discussion_r3437794691
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -1150,14 +1150,16 @@ public ReplicationManagerReport
getReplicationManagerReport() {
return scm.getReplicationManager().getContainerReport();
}
+ /*
+ * This command is deprecated and is retained for backward compatibility. It
no longer finalizes SCM
+ * as the process is driven from OM which will trigger the SCM finalize
process.
+ */
@Override
@Deprecated
- public StatusAndMessages finalizeScmUpgrade(String upgradeClientID) throws
- IOException {
+ public StatusAndMessages finalizeScmUpgrade(String upgradeClientID) {
if (!scm.getVersionManager().needsFinalization()) {
return new StatusAndMessages(ALREADY_FINALIZED, Collections.emptyList());
}
- finalizeUpgrade();
return new StatusAndMessages(STARTING_FINALIZATION,
Collections.emptyList());
Review Comment:
Actually you're correct, it needs to return ALREADY_FINALIZED in both cases
so that we don't enter the [monitoring
loop](https://github.com/apache/ozone/blob/86039e8302d859d62c078ef23e01efc640397e72/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/scm/FinalizeScmUpgradeSubcommand.java#L86),
which will never complete. That also satisfies [this
requirement](https://github.com/apache/ozone/blob/86039e8302d859d62c078ef23e01efc640397e72/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/scm/FinalizeScmUpgradeSubcommand.java#L76)
so the command exits successfully. Let's add a comment here explaining this.
--
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]