CTTY commented on code in PR #2296:
URL: https://github.com/apache/iceberg-rust/pull/2296#discussion_r3185140986


##########
crates/iceberg/src/transaction/snapshot.rs:
##########
@@ -175,17 +177,24 @@ impl<'a> SnapshotProducer<'a> {
             let manifest_list = current_snapshot
                 .load_manifest_list(self.table.file_io(), 
&self.table.metadata_ref())
                 .await?;
-            for manifest_list_entry in manifest_list.entries() {
-                let manifest = manifest_list_entry
-                    .load_manifest(self.table.file_io())
-                    .await?;
-                for entry in manifest.entries() {
-                    let file_path = entry.file_path();
-                    if new_files.contains(file_path) && entry.is_alive() {
-                        referenced_files.push(file_path.to_string());
+
+            let entries: Vec<_> = 
manifest_list.consume_entries().into_iter().collect();
+            futures::stream::iter(entries)
+                .map(|entry| {
+                    let file_io = self.table.file_io().clone();
+                    spawn(async move { entry.load_manifest(&file_io).await })
+                })
+                .buffer_unordered(32)

Review Comment:
   +1 on making this a constant



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to