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

object_store: refactor direct multipart methods, implement for GCP. #1

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

jacksonrnewhouse
Copy link

Refactor of the multipart additions to ObjectStore, implement for GCP.

Ok(inner
.put_multipart_part(bytes.to_vec(), part_number)
.await
.unwrap())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to unwrap here (or anywhere in this code) on errors as that will panic our code (which expects, at least in the controller, to be able to handle errors).

Generally you would handle this by wrapping the IO error in the crate error type. For example, there's a Error::Generic type that can handle any kind of error.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, figured it out. The Error in the gcp context is GCP specific and I was having a hard time constructing it. The crate's Error does the trick.

@jacksonrnewhouse jacksonrnewhouse merged commit 9bd18bd into 43.0.0/arroyo_patches Sep 5, 2023
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants