szetszwo commented on code in PR #8096:
URL: https://github.com/apache/ozone/pull/8096#discussion_r1997745274
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java:
##########
@@ -147,7 +147,7 @@ protected void runTask() throws Exception {
unhealthyContainerStateStatsMap);
long start = Time.monotonicNow();
long currentTime = System.currentTimeMillis();
Review Comment:
currentTime is still using System.currentTimeMillis(). It will be passed to
`ContainerHealthRecords.generateUnhealthyRecords(`. Not sure if it should be
changed to `Time.monotonicNow()`.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStatus.java:
##########
@@ -123,7 +124,7 @@ public boolean operationalStateExpired() {
if (0 == opStateExpiryEpochSeconds) {
return false;
}
- return System.currentTimeMillis() / 1000 >= opStateExpiryEpochSeconds;
+ return Time.monotonicNow() / 1000 >= opStateExpiryEpochSeconds;
Review Comment:
Will `NodeStatus` be stored in disk? If it will, then we cannot use
Time.monotonicNow() for opStateExpiryEpochSeconds since it does use unix epoch.
It won't work after the server restart.
--
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]