[ 
https://issues.apache.org/jira/browse/HDFS-15943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

JiangHua Zhu updated HDFS-15943:
--------------------------------
    Description: 
In HeartbeatManager#Monitor, due to the lack of more restrictions, multiple 
heartbeatCheck() will be executed at the same time.
Code:
if (lastHeartbeatCheck + heartbeatRecheckInterval <now) {
             heartbeatCheck();
           }

  was:
Inside HeartbeatManager#heartbeatCheck(), a variable is defined here:
DatanodeDescriptor dead = null;
In fact, when HeartbeatManager#heartbeatCheck() is executed, it will cause the 
DatanodeManger to modify the data not in time.
Code:
DatanodeDescriptor dead = null;
synchronized(this) {
......
}
if (dead != null) {
......
dm.removeDeadDatanode(dead, !dead.isMaintenance());
......
}

And we will not prevent the simultaneous execution of heartbeatCheck() twice.


> Solve that multiple HeartbeatManager#heartbeatCheck() will be executed at the 
> same time
> ---------------------------------------------------------------------------------------
>
>                 Key: HDFS-15943
>                 URL: https://issues.apache.org/jira/browse/HDFS-15943
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: JiangHua Zhu
>            Assignee: JiangHua Zhu
>            Priority: Major
>
> In HeartbeatManager#Monitor, due to the lack of more restrictions, multiple 
> heartbeatCheck() will be executed at the same time.
> Code:
> if (lastHeartbeatCheck + heartbeatRecheckInterval <now) {
>              heartbeatCheck();
>            }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to