amaliujia commented on code in PR #10746:
URL: https://github.com/apache/ozone/pull/10746#discussion_r3620679674
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -487,6 +495,22 @@ public RegisteredCommand register(
.build();
}
+ /**
+ * Whether the datanode's exposed ports changed between two registrations.
+ * Compared as a set of name=value entries, since
+ * {@link DatanodeDetails.Port#equals} ignores the port value.
+ */
+ private static boolean portsChanged(DatanodeDetails oldNode,
+ DatanodeDetails newNode) {
+ return !portValues(oldNode).equals(portValues(newNode));
Review Comment:
Curious that if we know that we are fixing for
`DatanodeDetails.Port.Name.RATIS_DATASTREAM` missing issue, can we only look
for the case in which the newNode has the data stream port while the old node
does not, thus we need to do an update?
It does not look wrong that we compare entire port set, but the side effect
is I do not know if there is any port that do not need to be updated.
--
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]