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

DelayedTransport shutdown race #7743

Closed
wants to merge 3 commits into from

Conversation

YifeiZhuang
Copy link
Contributor

@YifeiZhuang YifeiZhuang commented Dec 21, 2020

To fix #6283.
Change to be more explicit and fail fast on ClientStream calls order before and after start(), corresponding to configuration and RPC calls, respectively. This fixes the issue because it guarantees that removing from pendingStream in delayedClientTransport means it is safe to shutdown. If by the time pendingStream is processed, start() has not been called yet, nothing will drain because of the explicit strict call check, and the subsequent calls will directly execute on the realStream. This is guarded in the locking block.

YifeiZhuang added a commit that referenced this pull request Dec 21, 2020
…le (#7720)" (#7744)

This reverts commit 9085012.
Alternative solution: alternative #7743
@YifeiZhuang YifeiZhuang changed the title Delayedtransportshutdownrace DelayedTransport shutdown race Dec 22, 2020
Copy link
Contributor Author

@YifeiZhuang YifeiZhuang left a comment

Choose a reason for hiding this comment

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

LGTM.

@YifeiZhuang
Copy link
Contributor Author

Test

@YifeiZhuang
Copy link
Contributor Author

Jump to #7749

dfawley pushed a commit to dfawley/grpc-java that referenced this pull request Jan 15, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DelayedClientTransport can trigger RejectedExecutionException
2 participants