Commits


Oliver Layer authored and GitHub committed c50c4fa60d1
GH-44334: [C++] Fix S3 error handling in `ObjectOutputStream` (#44335) ### Rationale for this change See [#GH-44334](https://github.com/apache/arrow/issues/44334). Errors from the AWS SDK are not correctly propagated onto the user of the `ObjectOutputStream`, not indicating an error even though there was one in some cases. ### What changes are included in this PR? - Directly pass the outcome of the AWS SDK to `HandleUploadUsingSingleRequestOutcome` aswell as `HandleUploadPartOutcome` instead of wrapping it in a arrow `Result` class which has been constructed implictily, always indicating success. - Adjust cleanup handling in `Close` so that the output stream is closed if there was an error in any of the called methods. Otherwise, destructing the output stream in debug builds fails as we abort if `Close()` returns something else than `Status::OK()`. See the [code pointer here](https://github.com/apache/arrow/blob/64891d1d176dd45f3fae574e1bcfac6fee197e5f/cpp/src/arrow/io/interfaces.cc#L293). ### Are these changes tested? - Added assertions for catching exceptions on `Close()` in case `delayed_open` is enabled. ### Are there any user-facing changes? No. * GitHub Issue: #44334 Authored-by: Oliver Layer <o.layer@celonis.de> Signed-off-by: Antoine Pitrou <antoine@python.org>