laskoviymishka commented on code in PR #3179:
URL: https://github.com/apache/iceberg-rust/pull/3179#discussion_r4206567083
##########
crates/storage/opendal/src/lib.rs:
##########
@@ -513,6 +519,24 @@ impl OpenDalStorage {
}
}
+ /// Bounds the S3 request size. Without a chunk size OpenDAL turns each
caller
+ /// buffer into one request, and `ParquetWriter` hands over a whole row
group
+ /// at a time. Other backends keep OpenDAL's defaults.
+ #[allow(unreachable_patterns)]
+ fn write_options(&self) -> WriteOptions {
+ match self {
+ #[cfg(feature = "opendal-s3")]
+ OpenDalStorage::S3 {
+ multipart_part_size,
+ ..
+ } => WriteOptions {
+ chunk:
Some(usize::try_from(*multipart_part_size).unwrap_or(usize::MAX)),
Review Comment:
The parser pins this to [5 MiB, i32::MAX], but `multipart_part_size` is a
`pub` field with `#[serde(default)]`, so a deserialized FileIO can carry a
value that never went through it — and `unwrap_or(usize::MAX)` then turns an
out-of-range one into no chunking at all, which is exactly the unbounded write
this PR removes. Since the serialized FileIO ships to workers, I'd clamp to the
parser's bounds here (or re-run the validator on deserialize). Not blocking —
the property path itself is already covered.
--
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]