sodonnel commented on code in PR #11692:
URL: https://github.com/apache/ozone/pull/11692#discussion_r4347522749
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMDatanodeHeartbeatDispatcher.java:
##########
@@ -182,6 +196,25 @@ public List<SCMCommand<?>>
dispatch(SCMHeartbeatRequestProto heartbeat) {
return commands;
}
+ /**
+ * Returns true if the node is not healthy (stale or dead) and its reported
version is
+ * incompatible with this SCM. Healthy nodes are always allowed through —
their version was
+ * already validated at registration. If the node status cannot be
determined, returns false
+ * so the heartbeat is processed normally.
+ */
+ private boolean isUnhealthyWithIncompatibleVersion(DatanodeDetails
datanodeDetails,
+ SCMHeartbeatRequestProto heartbeat) {
+ if (!heartbeat.hasDatanodeVersion()) {
+ return false;
+ }
+ try {
+ return !nodeManager.getNodeStatus(datanodeDetails).isHealthy()
+ && nodeManager.shouldFenceDatanode(datanodeDetails,
heartbeat.getDatanodeVersion());
+ } catch (NodeNotFoundException e) {
Review Comment:
I don't think this is valid as for ZDU to work, the cluster must first be
upgraded to a ZDU version. DNs will only not send a version report if there are
at a very old version prior to the version report stuff getting added.
Therefore this should not happen in practice - the DN should always have a
version report.
--
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]