pingtimeout commented on code in PR #3415:
URL: https://github.com/apache/polaris/pull/3415#discussion_r2704161767


##########
runtime/service/src/main/java/org/apache/polaris/service/task/TableCleanupTaskHandler.java:
##########
@@ -209,7 +263,28 @@ private Stream<TaskEntity> getMetadataTaskStream(
       CallContext callContext) {
     PolarisCallContext polarisCallContext = 
callContext.getPolarisCallContext();
     int batchSize = 
callContext.getRealmConfig().getConfig(BATCH_SIZE_CONFIG_KEY, 10);
-    return getMetadataFileBatches(tableMetadata, batchSize).stream()
+
+    // Stream all metadata files without materializing them all at once

Review Comment:
   The parameters of the stream construction are eager, so I am afraid the only 
thing lazily evaluated here is the call to `.flatMap(Function.identity())`



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