Github user jinxing64 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16989#discussion_r124957319
  
    --- Diff: 
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/OneForOneBlockFetcher.java
 ---
    @@ -126,4 +150,38 @@ private void failRemainingBlocks(String[] 
failedBlockIds, Throwable e) {
           }
         }
       }
    +
    +  private class DownloadCallback implements StreamCallback {
    +
    +    private WritableByteChannel channel = null;
    +    private File targetFile = null;
    +    private int chunkIndex;
    +
    +    public DownloadCallback(File targetFile, int chunkIndex) throws 
IOException {
    +      this.targetFile = targetFile;
    +      this.channel = Channels.newChannel(new FileOutputStream(targetFile));
    --- End diff --
    
    @zsxwing @cloud-fan 
    `OneForOneBlockFetcher` "open blocks" asynchronously. If I understand 
correctly, the retry of the `start()` in `OneForOneBlockFetcher` is only 
triggered when failure of sending `OpenBlocks`, but failure of fetching chunk 
cannot trigger the retry in `RetryingBlockFetcher`. `DownloadCalback` is not 
initialized when the failure of "open blocks" happens. So there cannot be two 
`DownloadCallbacks` for same stream working at the same time.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to