saurabhd336 commented on code in PR #3132:
URL: https://github.com/apache/celeborn/pull/3132#discussion_r1994051774
##########
client/src/main/java/org/apache/celeborn/client/read/WorkerPartitionReader.java:
##########
@@ -210,14 +224,39 @@ public PartitionLocation getLocation() {
return location;
}
+ @Override
+ public Optional<PartitionReaderCheckpointMetadata>
getPartitionReaderCheckpointMetadata() {
+ return isCheckpointEnabled
+ ? Optional.of(new
PartitionReaderCheckpointMetadata(chunkIdsAlreadyReturned))
+ : Optional.empty();
+ }
+
+ @Override
+ public void updateCheckpointMetadata(PartitionReaderCheckpointMetadata
checkpointMetadata) {
+ chunkIdsAlreadyReturned = checkpointMetadata.getReturnedChunks();
+ }
+
private void fetchChunks() throws IOException, InterruptedException {
final int inFlight = chunkIndex - startChunkIndex - returnedChunks;
if (inFlight < fetchMaxReqsInFlight) {
- final int toFetch =
- Math.min(fetchMaxReqsInFlight - inFlight + 1, endChunkIndex + 1 -
chunkIndex);
- for (int i = 0; i < toFetch; i++) {
- if (testFetch && fetchChunkRetryCnt < fetchChunkMaxRetry - 1 &&
chunkIndex == 3) {
+ int toFetch = Math.min(fetchMaxReqsInFlight - inFlight + 1,
endChunkIndex + 1 - chunkIndex);
+
+ while (toFetch > 0 && chunkIndex <= endChunkIndex) {
+ if (chunkIdsAlreadyReturned.contains(chunkIndex)) {
Review Comment:
Now handled
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]