saurabhd336 commented on code in PR #3132:
URL: https://github.com/apache/celeborn/pull/3132#discussion_r1994651549


##########
client/src/main/java/org/apache/celeborn/client/read/WorkerPartitionReader.java:
##########
@@ -156,13 +173,21 @@ public boolean hasNext() {
     return returnedChunks < endChunkIndex - startChunkIndex + 1;
   }
 
+  private void checkpoint() {
+    if (lastReturnedChunkId != -1) {
+      partitionReaderCheckpointMetadata.ifPresent(
+          readerCheckpointMetadata -> 
readerCheckpointMetadata.checkpoint(lastReturnedChunkId));
+    }
+  }
+
   @Override
   public ByteBuf next() throws IOException, InterruptedException {
     checkException();
+    checkpoint();

Review Comment:
   Yes makes sense. Ack



-- 
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-unsubscr...@celeborn.apache.org

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

Reply via email to