[ https://issues.apache.org/jira/browse/HDFS-16016?focusedWorklogId=610682&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-610682 ]
ASF GitHub Bot logged work on HDFS-16016: ----------------------------------------- Author: ASF GitHub Bot Created on: 14/Jun/21 13:53 Start Date: 14/Jun/21 13:53 Worklog Time Spent: 10m Work Description: virajjasani commented on a change in pull request #2998: URL: https://github.com/apache/hadoop/pull/2998#discussion_r650968368 ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java ########## @@ -1104,6 +1122,34 @@ private void sendLifeline() throws IOException { } } + class IBRTaskHandler implements Runnable { + + @Override + public void run() { + LOG.info("Starting IBR Task Handler."); + while (shouldRun()) { + try { + final long startTime = scheduler.monotonicNow(); + final boolean sendHeartbeat = scheduler.isHeartbeatDue(startTime); + if (!dn.areIBRDisabledForTests() && + (ibrManager.sendImmediately() || sendHeartbeat)) { + synchronized (sendIBRLock) { + ibrManager.sendIBRs(bpNamenode, bpRegistration, + bpos.getBlockPoolId(), getRpcMetricSuffix()); + } + } + // There is no work to do; sleep until hearbeat timer elapses, + // or work arrives, and then iterate again. + ibrManager.waitTillNextIBR(scheduler.getHeartbeatWaitTime()); Review comment: > With IBR separated in a new thread, maybe later we could have a new config key that controls IBR interval separately, or add a configurable constant offset (from the FBR timer) to the IBR timer. This isn't something we need to add to this jira. Just a thought. I agree. We can add new config or continue with IBR/FBR expiring around same time for some time. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 610682) Time Spent: 4h 40m (was: 4.5h) > BPServiceActor add a new thread to handle IBR > --------------------------------------------- > > Key: HDFS-16016 > URL: https://issues.apache.org/jira/browse/HDFS-16016 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: JiangHua Zhu > Assignee: Viraj Jasani > Priority: Minor > Labels: pull-request-available > Time Spent: 4h 40m > Remaining Estimate: 0h > > Now BPServiceActor#offerService() is doing many things, FBR, IBR, heartbeat. > We can handle IBR independently to improve the performance of heartbeat and > FBR. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org