Skip to content

Implemented conditional shutdown#23710

Merged
veblush merged 1 commit intogrpc:masterfrom
veblush:shutdown
Sep 4, 2020
Merged

Implemented conditional shutdown#23710
veblush merged 1 commit intogrpc:masterfrom
veblush:shutdown

Conversation

@veblush
Copy link
Copy Markdown
Contributor

@veblush veblush commented Aug 1, 2020

This PR changes grpc_shutdown to execute shutdown immediately if it's called not from execution threads, which is free from the dead-lock case where original async grpc_shutdown tried to address. This makes shutdown more deterministic so that unit tests can assume that all gRPC resources including threads are properly deallocated at the end of test. Note that grpc_shutdown can still spawn a detached thread for actual shutdown when the final grpc_shutdown is called from the execution thread.

Fixes: #23604

@veblush
Copy link
Copy Markdown
Contributor Author

veblush commented Aug 22, 2020

grpc_build_artifacts_multiplatform: running

@veblush
Copy link
Copy Markdown
Contributor Author

veblush commented Aug 25, 2020

Some python failures link: Known problem #23028

@veblush
Copy link
Copy Markdown
Contributor Author

veblush commented Aug 27, 2020

Testing with internal cherry-pick cl/328662650 -> Passed by a couple of deflakes.

@veblush veblush force-pushed the shutdown branch 2 times, most recently from 13b4c3a to 46cd3e4 Compare August 28, 2020 20:26
Copy link
Copy Markdown
Contributor

@vjpai vjpai left a comment

Choose a reason for hiding this comment

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

Great, all comments resolved.

veblush added a commit that referenced this pull request Sep 17, 2020
Fix-forward "Implemented conditional shutdown" (#23710)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement lang/core release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditional blocking shutdown

3 participants