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

Better handling for uncommon/exception gRPC cases #4016

Merged
merged 4 commits into from
Jun 24, 2023

Conversation

niloc132
Copy link
Member

Fixes three logged errors. Two are handed by not permitting an error to be thrown into gRPC internals, but instead catch, cancel the stream, and log the error. The third case is handled by following the appropriate async write pattern required by servlets.

Fixes #3965
Fixes #3052

@niloc132 niloc132 added this to the June 2023 milestone Jun 16, 2023
Comment on lines 80 to 84
try {
outputStream.writeAndCloseWhenReady(payload.array(), safelyComplete);
} catch (IOException e) {
safelyComplete.run();
}
Copy link
Member

Choose a reason for hiding this comment

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

It looks like writeAndCloseWhenReady already handles running the close when an IOException is thrown - are we explicitly doubling up here? Or, just re-running it b/c there isn't harm?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah thanks - it used to be that an IOException was possible just accessing the output stream, but I rearranged that to ensure it couldn't happen... and left the try/catch.

GRPC servlet won't handle this error anyway.
@devinrsmith devinrsmith self-requested a review June 22, 2023 16:05
@niloc132 niloc132 merged commit d358f50 into deephaven:main Jun 24, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC IllegalStateException when setTrailerFields on Committed RPC. Jetty IllegalStateException isReady
2 participants