nandakumar131 commented on code in PR #4358:
URL: https://github.com/apache/ozone/pull/4358#discussion_r1141696201
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java:
##########
@@ -355,6 +356,26 @@ public boolean addSCM(AddSCMRequest request) throws
IOException {
return getRatisServer().addSCM(request);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean removeSCM(RemoveSCMRequest request) throws IOException {
+ // Currently we don't support decommission of Primordial SCM
+ // The caller should make sure that the requested node is not Primordial
SCM
+
+ String clusterId = scm.getClusterId();
+ if (!request.getClusterId().equals(scm.getClusterId())) {
+ throw new IOException("SCM " + request.getScmId() +
Review Comment:
@neils-dev, the check that is done here is to make sure that the request has
the correct cluster-ID and matches the current SCM's cluster-ID.
The primordial check has to be done by the caller of this method. This
method assumes that the current SCM is not primordial SCM.
Primordial check is done in `StorageContainerManager#removePeerFromHARing`
--
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]