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

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

haiyang1987 commented on code in PR #4903:
URL: https://github.com/apache/hadoop/pull/4903#discussion_r977073373


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -2310,10 +2310,10 @@ private void invalidate(String bpid, Block[] 
invalidBlks, boolean async)
       throws IOException {
     final List<String> errors = new ArrayList<String>();
     for (int i = 0; i < invalidBlks.length; i++) {
-      final ReplicaInfo removing;
+      final ReplicaInfo info;

Review Comment:
   > Is it possible to move segment L2313~L2349 to async also? Because it 
includes some IO request here. # this is not blocker issue.
   
   At present, it is no changed to asynchronous mainly because 
   1.List<String> errors are defined in L2311, which will record the replicas 
that failed to delete and return IOException synchronously according to the 
errors list information
   2.FsDatasetAsyncDiskService#deleteAsync and init ReplicaFileDeleteTask 
require ReplicaInfo and FsVolumeImpl etc info
   
   





> Improve async delete replica on datanode
> ----------------------------------------
>
>                 Key: HDFS-16774
>                 URL: https://issues.apache.org/jira/browse/HDFS-16774
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Haiyang Hu
>            Assignee: Haiyang Hu
>            Priority: Major
>              Labels: pull-request-available
>
> In our online cluster, a large number of ReplicaNotFoundExceptions occur when 
> client reads the data.
> After tracing the root cause, it is caused by the asynchronous deletion of 
> the replica operation has  many stacked pending deletion  caused 
> ReplicationNotFoundException.
> Current the asynchronous delete of the replica operation process is as 
> follows:
> 1.remove the replica from the ReplicaMap
> 2.delete the replica file on the disk [blocked in threadpool]
> 3.notifying namenode through IBR [blocked in threadpool]
> In order to avoid similar problems as much as possible, consider optimizing 
> the execution flow:
> The deleting replica from ReplicaMap, deleting replica from disk and 
> notifying namenode through IBR are processed in the same asynchronous thread.



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

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

Reply via email to