You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/11/23 09:36:16 UTC

[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1000: [CELEBORN-50] Fix fetch chunk illegal state exception.

AngersZhuuuu commented on code in PR #1000:
URL: https://github.com/apache/incubator-celeborn/pull/1000#discussion_r1030212204


##########
client/src/main/java/org/apache/celeborn/client/read/Replica.java:
##########
@@ -58,7 +58,12 @@ class Replica {
   public synchronized TransportClient getOrOpenStream() throws IOException, InterruptedException {
     if (client == null || !client.isActive()) {
       client = clientFactory.createClient(location.getHost(), location.getFetchPort());
+      OpenStream openBlocks =
+          new OpenStream(shuffleKey, location.getFileName(), startMapIndex, endMapIndex);
+      ByteBuffer response = client.sendRpcSync(openBlocks.toByteBuffer(), timeoutMs);
+      streamHandle = (StreamHandle) Message.decode(response);

Review Comment:
   Just `streamHandle == null` ?
   Then same code won't write twice. 
   Also for client.isActive == false, we can have a log to indicate this case



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org