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:23:35 UTC

[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #999: [CELEBORN-48][BUG] Channel inactive may cause new client use old stream id to fetch data

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


##########
client/src/main/java/org/apache/celeborn/client/read/Replica.java:
##########
@@ -57,7 +60,21 @@ class Replica {
 
   public synchronized TransportClient getOrOpenStream() throws IOException, InterruptedException {
     if (client == null || !client.isActive()) {
+      if (client != null) {
+        logger.error(
+            "Current channel from "
+                + client.getChannel().localAddress()
+                + " to "
+                + client.getChannel().remoteAddress()
+                + " for "
+                + this
+                + " is not active.");
+      }
       client = clientFactory.createClient(location.getHost(), location.getFetchPort());
+      // When changing client, the origin client's corresponding streamId may be removed
+      // by channel inactive. Replica should request a new StreamHandle for the new client again.
+      // Newly returned numChunks should be the same.
+      streamHandle = null;

Review Comment:
   @waitinfuture @FMX 



-- 
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