cloud-fan commented on a change in pull request #23510: [SPARK-26590][CORE] 
make fetch-block-to-disk backward compatible
URL: https://github.com/apache/spark/pull/23510#discussion_r247380202
 
 

 ##########
 File path: 
common/network-common/src/main/java/org/apache/spark/network/client/TransportResponseHandler.java
 ##########
 @@ -171,6 +186,21 @@ public void handle(ResponseMessage message) throws 
Exception {
         listener.onSuccess(resp.streamChunkId.chunkIndex, resp.body());
         resp.body().release();
       }
+      // The response is `ChunkFetchSuccess`. It's either because the request 
was a normal chunk
+      // fetch request, or the server side is an old version that doesn't 
support fetch chunk as
+      // stream. So the next line is either a no-op, or remove the callback 
that will never be
+      // called later.
+      outstandingFetchAsStreams.remove(resp.streamChunkId);
+    } else if (message instanceof ChunkFetchStreamResponse) {
+      ChunkFetchStreamResponse resp = (ChunkFetchStreamResponse) message;
+      StreamCallback callback = 
outstandingFetchAsStreams.get(resp.streamChunkId);
 
 Review comment:
   good catch!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to