-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
getaddrinfo: retrying on eai_again #33130
Conversation
Signed-off-by: Alyssa Wilk <[email protected]>
@@ -157,6 +159,9 @@ class GetAddrInfoDnsResolver : public DnsResolver, public Logger::Loggable<Logge | |||
|
|||
next_query = std::move(pending_queries_.front()); | |||
pending_queries_.pop_front(); | |||
if (reresolve && next_query->cancelled_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it's probably not important, but do we need the reresolve
condition here? In other words, shouldn't any next_query
that is in the cancelled state be skipped? I realize the only way this can happen right now is if reresolve is true below and we get EAI_AGAIN so we add it back to pending_queries_
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's currently possible to start a resolve and cancel before it gets popped from the queue at which point we'll do the resolve anyway. doubt it matters but wanted it guarded just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tsan caught the issue I was hoping to fix in a follow-up which is that cancel was always non-thread-safe.
/wait
@@ -157,6 +159,9 @@ class GetAddrInfoDnsResolver : public DnsResolver, public Logger::Loggable<Logge | |||
|
|||
next_query = std::move(pending_queries_.front()); | |||
pending_queries_.pop_front(); | |||
if (reresolve && next_query->cancelled_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's currently possible to start a resolve and cancel before it gets popped from the queue at which point we'll do the resolve anyway. doubt it matters but wanted it guarded just in case.
Signed-off-by: Alyssa Wilk <[email protected]>
This reverts commit 7f6df24. Signed-off-by: Alyssa Wilk <[email protected]>
This reverts commit 7f6df24. Signed-off-by: Alyssa Wilk <[email protected]>
…yproxy#33159) This reverts commit d59eb55. Signed-off-by: Alyssa Wilk <[email protected]>
* Reapply "getaddrinfo: retrying on eai_again (#33130)" (#33159) Risk Level: low Testing: new tests Docs Changes: n/a Release Notes: inline [Optional Runtime guard:] yes Signed-off-by: Alyssa Wilk <[email protected]>
Risk Level: low Testing: new tests Docs Changes: n/a Release Notes: inline [Optional Runtime guard:] yes Signed-off-by: Alyssa Wilk <[email protected]>
…proxy#33159) This reverts commit 7f6df24. Signed-off-by: Alyssa Wilk <[email protected]>
* Reapply "getaddrinfo: retrying on eai_again (envoyproxy#33130)" (envoyproxy#33159) Risk Level: low Testing: new tests Docs Changes: n/a Release Notes: inline [Optional Runtime guard:] yes Signed-off-by: Alyssa Wilk <[email protected]>
Risk Level: low
Testing: new tests
Docs Changes: n/a
Release Notes: inline
[Optional Runtime guard:] yes