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

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

hfutatzhanghb opened a new pull request, #6503:
URL: https://github.com/apache/hadoop/pull/6503

   ### Description of PR
   Refer to HDFS-17359
   
   In method DFSStripedOutputStream#checkStreamerFailures, we have below codes:
   ```java
       Set<StripedDataStreamer> newFailed = checkStreamers();
       if (newFailed.size() == 0) {
         return;
       }    if (isNeedFlushAllPackets) {
         // for healthy streamers, wait till all of them have fetched the new 
block
         // and flushed out all the enqueued packets.
         flushAllInternals();
       }
       // recheck failed streamers again after the flush
       newFailed = checkStreamers(); 
   ```
   We should better move the re-check logic into if condition to reduce useless 
invocation.




> EC: recheck failed streamers should only after flushing all packets.
> --------------------------------------------------------------------
>
>                 Key: HDFS-17359
>                 URL: https://issues.apache.org/jira/browse/HDFS-17359
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: ec
>            Reporter: farmmamba
>            Assignee: farmmamba
>            Priority: Minor
>
> In method DFSStripedOutputStream#checkStreamerFailures, we have below codes:
> {code:java}
>     Set<StripedDataStreamer> newFailed = checkStreamers();
>     if (newFailed.size() == 0) {
>       return;
>     }    if (isNeedFlushAllPackets) {
>       // for healthy streamers, wait till all of them have fetched the new 
> block
>       // and flushed out all the enqueued packets.
>       flushAllInternals();
>     }
>     // recheck failed streamers again after the flush
>     newFailed = checkStreamers(); {code}
> We should better move the re-check logic into if condition to reduce useless 
> invocation.



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

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

Reply via email to