tiwalter commented on a change in pull request #449: HDFS-14158. Fix the 
Checkpointer not to ignore the configured "dfs.namenode.checkpoint.period" > 5 
minutes
URL: https://github.com/apache/hadoop/pull/449#discussion_r249327337
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java
 ##########
 @@ -160,7 +159,7 @@ public void run() {
         break;
       }
       try {
-        Thread.sleep(periodMSec);
+        Thread.sleep(LongMath.gcd(periodMSec, checkpointPeriodMSec));
 
 Review comment:
   Hi @aajisaka, 
   i came to the same conclusion, but if you choose periodMsec instead, the 
next checkpoint would be processed after 540 seconds (it's not the configured 
checkpoint period). 
   
   What if you create a new variable 'lastEditLogCheckTime' and add an 
if-statement before checking the edit log `if(now >= lastEditLogCheckTime + 
periodMSec)`?
   
   Then we are safe and don't miss any of the configured periods and we don't 
check to often.
   
   What's your opinion?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to