tomscut commented on a change in pull request #3887:
URL: https://github.com/apache/hadoop/pull/3887#discussion_r783974286



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
##########
@@ -1304,12 +1305,18 @@ long scheduleBlockReport(long delay, boolean 
isRegistration) {
      * Numerical overflow is possible here.
      */
     void scheduleNextBlockReport() {
+      scheduleNextBlockReport(false);
+    }
+
+    void scheduleNextBlockReport(boolean forceFullBr) {
       // If we have sent the first set of block reports, then wait a random
       // time before we start the periodic block reports.
       if (resetBlockReportTime) {
         nextBlockReportTime.getAndSet(monotonicNow() +
             ThreadLocalRandom.current().nextInt((int) 
(blockReportIntervalMs)));
         resetBlockReportTime = false;
+      } else if (forceFullBr) {
+        nextBlockReportTime.getAndSet(monotonicNow() + blockReportIntervalMs);

Review comment:
       If many datanodes of a large cluster is triggered in batches, the FBR 
time of these datanodes will be concentrated in the future, which may cause 
great pressure on NN. Maybe we also need to add a random value here.




-- 
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]

Reply via email to