Revert "Revert "Replace work serializer with a mutex in c-ares resolver" #28324"#28325
Merged
apolcyn merged 4 commits intogrpc:masterfrom Dec 9, 2021
Merged
Revert "Revert "Replace work serializer with a mutex in c-ares resolver" #28324"#28325apolcyn merged 4 commits intogrpc:masterfrom
apolcyn merged 4 commits intogrpc:masterfrom
Conversation
markdroth
approved these changes
Dec 9, 2021
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
Outdated
Show resolved
Hide resolved
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
Show resolved
Hide resolved
markdroth
reviewed
Dec 9, 2021
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
Outdated
Show resolved
Hide resolved
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
Show resolved
Hide resolved
Member
|
Looks great! |
Contributor
Author
|
artifact/distrib failures are ruby CBF tracked in b/209603283 |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #28324, after adding what I believe is the fix (in the second commit here):
Access to the
ares_requestfield ofgrpc_resolve_address_ares_requestused to be synchronized by the work serializer, but was made unsynchronized by #27858It needs to be synchronized because, for example, when calling
r->ares_requset = grpc_dns_lookup_ares(...), I/O for the request can be picked up by another thread and cause that thread to scheduleon_done(where wedelete r->ares_request), all before writing the return value tor->ares_request.