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

fix: update grpc resumable upload error categorization to be more tolerant by BenWhitehead · Pull Request #2644 · googleapis/java-storage · GitHub

fix: update grpc resumable upload error categorization to be more tolerant - #2644

Merged
sydney-munro merged 1 commit into
mainfrom
fix-grpc-null-safe-onError
Jul 24, 2024
Merged

fix: update grpc resumable upload error categorization to be more tolerant#2644
sydney-munro merged 1 commit into
mainfrom
fix-grpc-null-safe-onError

Conversation

Copy link
Copy Markdown
Collaborator

When a client is shutting down, the Channel pool will deliver an error to our stream observer. This could happen before we are able to actually write a message. Update GapicUnbufferedFinalizeOnCloseResumableWritableByteChannel to not attempt to pass null to ImmutableList.of().

Sample exception

java.lang.NullPointerException
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:906)
	at com.google.common.collect.SingletonImmutableList.<init>(SingletonImmutableList.java:41)
	at com.google.common.collect.ImmutableList.of(ImmutableList.java:101)
	at com.google.cloud.storage.GapicUnbufferedFinalizeOnCloseResumableWritableByteChannel$Observer.onError(GapicUnbufferedFinalizeOnCloseResumableWritableByteChannel.java:233)
	at com.google.api.gax.tracing.TracedClientStreamingCallable$TracedResponseObserver.onError(TracedClientStreamingCallable.java:167)
	at com.google.api.gax.grpc.GrpcExceptionTranslatingStreamObserver.onError(GrpcExceptionTranslatingStreamObserver.java:60)
	at com.google.api.gax.grpc.ApiStreamObserverDelegate.onError(ApiStreamObserverDelegate.java:55)
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481)
	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
	at com.google.api.gax.grpc.ChannelPool$ReleasingClientCall$1.onClose(ChannelPool.java:570)

…erant

When a client is shutting down, the Channel pool will deliver an error to our stream observer. This could happen before we are able to actually write a message. Update GapicUnbufferedFinalizeOnCloseResumableWritableByteChannel to not attempt to pass null to ImmutableList.of().
BenWhitehead added the owlbot:ignore instruct owl-bot to ignore a PR label Jul 24, 2024
BenWhitehead requested a review from a team July 24, 2024 16:14
product-auto-label Bot added size: s Pull request size is small. api: storage Issues related to the googleapis/java-storage API. labels Jul 24, 2024

sydney-munro left a comment

Copy link
Copy Markdown
Contributor

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

thanks for grabbing that error!

sydney-munro merged commit 95697dd into main Jul 24, 2024
sydney-munro deleted the fix-grpc-null-safe-onError branch July 24, 2024 17:03
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: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL