You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "RexXiong (via GitHub)" <gi...@apache.org> on 2023/04/07 10:00:36 UTC

[GitHub] [incubator-celeborn] RexXiong commented on a diff in pull request #1413: [CELEBORN-510][FLINK] DataPartitionReader.addBuffer should not call s…

RexXiong commented on code in PR #1413:
URL: https://github.com/apache/incubator-celeborn/pull/1413#discussion_r1160597271


##########
common/src/main/java/org/apache/celeborn/common/network/server/DataPartitionReader.java:
##########
@@ -125,13 +125,8 @@ public void open(FileChannel dataFileChannel, FileChannel indexFileChannel) thro
     }
   }
 
-  public boolean sendWithCredit(int credit) {
-    int oldCredit = credits.getAndAdd(credit);
-    if (oldCredit == 0) {
-      return true;
-    }
-
-    return false;
+  public void addCredit(int credit) {
+    credits.getAndAdd(credit);
   }
 
   public synchronized boolean readAndSend(Queue<ByteBuf> bufferQueue, Recycler bufferRecycler)

Review Comment:
   better rename readAndSend method name



-- 
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: issues-unsubscribe@celeborn.apache.org

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