FMX commented on code in PR #2549:
URL: https://github.com/apache/celeborn/pull/2549#discussion_r1680403295


##########
client-spark/spark-3/src/main/scala/org/apache/spark/shuffle/celeborn/CelebornShuffleReader.scala:
##########
@@ -214,46 +219,71 @@ class CelebornShuffleReader[K, C](
             locations,
             streamHandlers,
             fileGroups.mapAttempts,
-            metricsCallback)
+            metricsCallback,
+            chunkPrefetchEnabled)
+          streams.put(partitionId, inputStream)
         } catch {
           case e: IOException =>
             logError(s"Exception caught when readPartition $partitionId!", e)
             exceptionRef.compareAndSet(null, e)
-            null
           case e: Throwable =>
             logError(s"Non IOException caught when readPartition 
$partitionId!", e)
             exceptionRef.compareAndSet(null, new CelebornIOException(e))
-            null
         }
-      } else null
+      }
     }
 
+    (startPartition until Math.min(

Review Comment:
   Adding a chunk limit that a task should prefetch to control the memory usage 
can be better.
   
   16 may not be suitable for all scenarios. And this config will be hacky to 
tweak.



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

Reply via email to