AlejandroMorgante commented on PR #18329:
URL: https://github.com/apache/iceberg/pull/18329#issuecomment-5922079566

   @danielcweeks I updated the PR to preserve the I/O behavior you pointed out. 
For `readTail(..., 0)`, we now request `bytes=-1` instead of `bytes=-0`, while 
copying zero bytes into the caller’s buffer and returning `0`. The `GetObject` 
request and stream closure are preserved. I also reverted the changes to 
`readFully`.
   
   | Scenario | Result |
   |---|---|
   | Empty object, zero-length tail read | Returns `0` |
   | Nonempty object, zero-length tail read | Returns `0`; buffer remains 
unchanged |
   | Missing object, zero-length tail read | Propagates the S3 error |
   | Permission failure | Propagates the S3 error |
   
   The first three cases passed against RustFS; permission-error propagation is 
covered by a unit test. The AWS module build and Checkstyle passed. This 
revision has not been tested against real S3.
   
   What do you think of this approach? Does it address your concern about 
preserving the I/O contract?
   


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