You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/06/07 02:28:00 UTC

[jira] [Commented] (HDFS-16898) Remove write lock for processCommandFromActor of DataNode to reduce impact on heartbeat

    [ https://issues.apache.org/jira/browse/HDFS-16898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17729892#comment-17729892 ] 

ASF GitHub Bot commented on HDFS-16898:
---------------------------------------

hfutatzhanghb commented on PR #5408:
URL: https://github.com/apache/hadoop/pull/5408#issuecomment-1579771518

   @Hexiaoqiao  sir, sorry for disturbing you here, could we push this issue forward? Thanks a lot , sir.




> Remove write lock for processCommandFromActor of DataNode to reduce impact on heartbeat
> ---------------------------------------------------------------------------------------
>
>                 Key: HDFS-16898
>                 URL: https://issues.apache.org/jira/browse/HDFS-16898
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 3.3.4
>            Reporter: farmmamba
>            Assignee: farmmamba
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>
> Now in method processCommandFromActor,  we have code like below:
>  
> {code:java}
> writeLock();
> try {
>   if (actor == bpServiceToActive) {
>     return processCommandFromActive(cmd, actor);
>   } else {
>     return processCommandFromStandby(cmd, actor);
>   }
> } finally {
>   writeUnlock();
> } {code}
> if method processCommandFromActive costs much time, the write lock would not release.
>  
> It maybe block the updateActorStatesFromHeartbeat method in offerService,furthermore, it can cause the lastcontact of datanode very high, even dead when lastcontact beyond 600s.
> {code:java}
> bpos.updateActorStatesFromHeartbeat(
>     this, resp.getNameNodeHaState());{code}
> here we can make write lock fine-grain in processCommandFromActor method to address this problem
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org