jopdorp commented on code in PR #3300:
URL: https://github.com/apache/iceberg-rust/pull/3300#discussion_r4168728039


##########
crates/iceberg/src/transaction/snapshot.rs:
##########
@@ -301,7 +328,9 @@ impl<'a> SnapshotProducer<'a> {
 
     // Write manifest file for added data files and return the ManifestFile 
for ManifestList.
     async fn write_added_manifest(&mut self) -> Result<ManifestFile> {
-        let added_data_files = std::mem::take(&mut self.added_data_files);
+        // Cloned rather than taken: the summary is built after the manifests, 
so the added
+        // files must still be here.
+        let added_data_files = self.added_data_files.clone();

Review Comment:
   Fixed in #3253 and merged here: the summary is built from the producer's 
lists before the manifests again, so `mem::take` is back and appends don't pay 
for a clone.



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