Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++][FS][S3] Errors in AWS SDK are not propagated correctly #44334

Closed
OliLay opened this issue Oct 8, 2024 · 1 comment
Closed

[C++][FS][S3] Errors in AWS SDK are not propagated correctly #44334

OliLay opened this issue Oct 8, 2024 · 1 comment
Assignees
Milestone

Comments

@OliLay
Copy link
Contributor

OliLay commented Oct 8, 2024

Describe the bug, including details regarding any error messages, version, and platform.

If the AWS SDK fails to send a request (for whatever reason), it indicates so in its *Outcome model classes. In the ObjectOutputStream, we have a bug where we do not check the outcome model that the AWS SDK returns to us correctly, hence indicating a write was successful although it was not.

Component(s)

C++

pitrou pushed a commit that referenced this issue Oct 8, 2024
### Rationale for this change

See [#GH-44334](#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>
@pitrou pitrou added this to the 18.0.0 milestone Oct 8, 2024
@pitrou
Copy link
Member

pitrou commented Oct 8, 2024

Issue resolved by pull request 44335
#44335

@pitrou pitrou closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants