FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: update grpc based ReadObject rpcs to remove race condition between cancellation and message handling by BenWhitehead · Pull Request #2708 · googleapis/java-storage · GitHub

fix: update grpc based ReadObject rpcs to remove race condition between cancellation and message handling - #2708

Merged
BenWhitehead merged 4 commits into
mainfrom
zc/gapic-removal
Sep 20, 2024
Merged

fix: update grpc based ReadObject rpcs to remove race condition between cancellation and message handling#2708
BenWhitehead merged 4 commits into
mainfrom
zc/gapic-removal

Conversation

Copy link
Copy Markdown
Collaborator

Update GapicUnbufferedReadableByteChannel to manage the grpc stream itself rather than using the stream iterator provided by gax. This allows us to ensure the cancellation is observed and our draining performs before returning from close().

As a side effect of not using the gax stream iterator, we now must handle stream restarts ourselves. GrpcStorageOptions.ReadObjectResumptionStrategy has been removed entirely, while RetryingDependencies and ResultRetryAlgorithm are now plumbed all the way down to the GapicUnbufferedReadableByteChannel.

BenWhitehead added the owlbot:ignore instruct owl-bot to ignore a PR label Sep 13, 2024
BenWhitehead requested a review from a team September 13, 2024 19:03
product-auto-label Bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels Sep 13, 2024
private final class LazyServerStreamIterator implements Iterator<ReadObjectResponse>, Closeable {
private ServerStream<ReadObjectResponse> serverStream;
private Iterator<ReadObjectResponse> responseIterator;
private final class ReadObjectObserver extends StateCheckingResponseObserver<ReadObjectResponse> {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Unfortunately, git thinks this class is a modification of the previous LazyServerStreamIterator except it's a whole new class.

Rather than comparing this class to what was there before, evaluate this class as brand new.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

…en cancellation and message handling

Update GapicUnbufferedReadableByteChannel to manage the grpc stream itself rather than using the stream iterator provided by gax. This allows us to ensure the cancellation is observed and our draining performs before returning from close().

As a side effect of not using the gax stream iterator, we now must handle stream restarts ourselves. GrpcStorageOptions.ReadObjectResumptionStrategy has been removed entirely, while RetryingDependencies and ResultRetryAlgorithm are now plumbed all the way down to the GapicUnbufferedReadableByteChannel.
sydney-munro added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 16, 2024
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 16, 2024
danielduhh requested a review from frankyn September 16, 2024 16:28
BenWhitehead merged commit 2c7f088 into main Sep 20, 2024
BenWhitehead deleted the zc/gapic-removal branch September 20, 2024 15:43
lqiu96 pushed a commit that referenced this pull request Sep 23, 2024
…en cancellation and message handling (#2708)

Update GapicUnbufferedReadableByteChannel to manage the grpc stream itself rather than using the stream iterator provided by gax. This allows us to ensure the cancellation is observed and our draining performs before returning from close().

As a side effect of not using the gax stream iterator, we now must handle stream restarts ourselves. GrpcStorageOptions.ReadObjectResumptionStrategy has been removed entirely, while RetryingDependencies and ResultRetryAlgorithm are now plumbed all the way down to the GapicUnbufferedReadableByteChannel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL