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

chore: remove WriteFlusher instead having dedicated WritableByteChannels #2514

Merged
merged 7 commits into from May 3, 2024

Conversation

BenWhitehead
Copy link
Collaborator

WriteFlusher has grown unwieldy to be able to properly handle the kinds of uploads that are performed while being able to perform appropriate fine grained response validation.

This is the first change in a series to remove WriteFlusher and create purpose dedicated UnbufferedWritableByteChannels for the different kinds of uploads we perform. By having dedicated channels more fine grained response validation and request packing can be performed.

I left multiple commits in this PR for the time being. They are generally:

  1. Introduce GapicUnbufferedDirectWritableByteChannel used for direct/single-shot uploads
  2. Introduce GapicUnbufferedChunkedResumableWritableByteChannel used for chunked resumable uploads
  3. Introduce GapicUnbufferedFinalizeOnCloseResumableWritableByteChannel used for for resumable uploads from files on disk
  4. Refactor GapicBidiUnbufferedWritableByteChannel
  5. Cleanup and removal of the majority of WriteFlushStrategy.java and its corresponding tests now that the functionality is distributed in each of the dedicated channel implementations

…lusher abstraction

WriteFlusher has grown unwieldy to be able to properly handle the kinds of uploads that are performed while being able to perform appropriate finegrained response validation.

This is the first change in a series to tease WriteFlusher apart and create an UnbufferedWritableByteChannel for each kind of upload where all logic for that upload can be encapsulated.
Make dedicated WritableByteChannel to handle chunked resumable uploads.
Make dedicated WritableByteChannel to handle streamed resumable uploads.
@BenWhitehead BenWhitehead added the owlbot:ignore instruct owl-bot to ignore a PR label Apr 24, 2024
@BenWhitehead BenWhitehead requested a review from a team as a code owner April 24, 2024 19:21
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: storage Issues related to the googleapis/java-storage API. labels Apr 24, 2024
@BenWhitehead BenWhitehead requested a review from a team as a code owner April 24, 2024 19:31
Copy link
Contributor

@JesseLovelace JesseLovelace left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@BenWhitehead BenWhitehead merged commit cebf059 into main May 3, 2024
22 checks passed
@BenWhitehead BenWhitehead deleted the de-abstract-writeObject branch May 3, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. owlbot:ignore instruct owl-bot to ignore a PR size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants