adoroszlai commented on code in PR #5516:
URL: https://github.com/apache/ozone/pull/5516#discussion_r1381555357
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -176,6 +178,7 @@ public SCMNodeManager(OzoneConfiguration conf,
String dnLimit = conf.get(ScmConfigKeys.OZONE_DATANODE_PIPELINE_LIMIT);
this.heavyNodeCriteria = dnLimit == null ? 0 : Integer.parseInt(dnLimit);
this.scmContext = scmContext;
+ this.clock = clock;
Review Comment:
These are the places where the "last heartbeat" time is stored:
https://github.com/apache/ozone/blob/e4ff5fa1b9b6a8335e5e1d7a118c9c3d4b46281d/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DatanodeInfo.java#L75
https://github.com/apache/ozone/blob/e4ff5fa1b9b6a8335e5e1d7a118c9c3d4b46281d/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DatanodeInfo.java#L88-L90
They should use `clock.millis()` instead of `Time.monotonicNow()`. We need
to pass `clock` to `NodeStateManager` here:
https://github.com/apache/ozone/blob/e4ff5fa1b9b6a8335e5e1d7a118c9c3d4b46281d/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java#L151-L152
--
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]