blackmwk commented on code in PR #3784:
URL: https://github.com/apache/iceberg-rust/pull/3784#discussion_r4737170056
##########
crates/iceberg/src/transaction/mod.rs:
##########
@@ -253,7 +253,9 @@ impl Transaction {
self.table = refreshed.clone();
}
- let mut current_table = self.table.clone();
+ // Use the storage credentials this load vended, even when the base is
+ // current: the base's may have expired.
+ let mut current_table =
self.table.clone().with_file_io(refreshed.file_io().clone());
Review Comment:
We should remove this.
##########
crates/iceberg/src/table.rs:
##########
@@ -570,6 +578,28 @@ mod tests {
assert!(Arc::ptr_eq(&manifest_list, &from_cache));
}
+ #[tokio::test]
+ async fn test_table_with_file_io_reads_manifests_through_it() {
Review Comment:
What this test covered? I think at lease you should provide another fileio
where the file doesn't exist, and it should not work then.
##########
crates/iceberg/src/transaction/mod.rs:
##########
@@ -274,7 +276,9 @@ impl Transaction {
.requirements(existing_requirements)
.build();
- catalog.update_table(table_commit).await
+ let committed = catalog.update_table(table_commit).await?;
+ // The table `update_table` returns may lack the vended credentials.
+ Ok(committed.with_file_io(current_table.file_io().clone()))
Review Comment:
I don't think we should change the fileio here. This table is returned by
catalog, if a new file io is required, it's catalog's responsiblity to do it.
--
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]