haiyang1987 commented on code in PR #5876:
URL: https://github.com/apache/hadoop/pull/5876#discussion_r1274553525
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterSafemodeService.java:
##########
@@ -161,11 +161,17 @@ protected void serviceInit(Configuration conf) throws
Exception {
@Override
public void periodicInvoke() {
- long now = Time.now();
+ long now = now();
long delta = now - startupTime;
Review Comment:
Thanks @Hexiaoqiao help me review it
yeah, your suggestion is right, because monotonicNow() is not affected by
settimeofday or similar system clock changes, if here invoke monotonicNow() to
calculate the delta will avoid the exception case.
if startupTime use monotonicNow, maybe cacheLastUpdateTime and
enterSafeModeTime we should also use monotonicNow() need to be consistent
what you think?
--
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]