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

net: make go resolver aware of network parameter #45016

Closed
wants to merge 2 commits into from
Closed

net: make go resolver aware of network parameter #45016

wants to merge 2 commits into from

Conversation

zhangboyang
Copy link
Contributor

@zhangboyang zhangboyang commented Mar 15, 2021

Currently, the go resolver always send two DNS queries (A and AAAA) even
if tcp4/udp4/ip4 or tcp6/udp6/ip6 is used. This can cause unwanted
latencies when making IPv4-only or IPv6-only connections.

This change make go resolver aware of network parameter. Now, only one A
query is sent when tcp4/udp4/ip4 is used, and vice versa for
tcp6/udp6/ip6.

Fixes #45024

Currently, the go resolver always send two DNS queries (A and AAAA) even
if tcp4/udp4/ip4 or tcp6/udp6/ip6 is used. This can cause unwanted
latencies when making IPv4-only or IPv6-only connections.

This change make go resolver aware of network parameter. Now, only one A
query is sent when tcp4/udp4/ip4 is used, and vice versa for
tcp6/udp6/ip6.
@google-cla google-cla bot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Mar 15, 2021
@gopherbot
Copy link
Contributor

This PR (HEAD: 4e50941) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/301709 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Emmanuel Odeke:

Patch Set 1: Run-TryBot+1 Trust+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go Bot:

Patch Set 1:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=f44f1901


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Emmanuel Odeke:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go Bot:

Patch Set 1:

Build is still in progress...
This change failed on misc-compile-darwinarm64:
See https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-darwinarm64_b6cc6789.log

Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go Bot:

Patch Set 1: TryBot-Result-1

10 of 21 TryBots failed:
Failed on misc-compile-darwinarm64: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-darwinarm64_b6cc6789.log
Failed on misc-compile-darwin: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-darwin_1a9f852a.log
Failed on misc-compile-solaris: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-solaris_16568b5a.log
Failed on misc-compile-linuxarm: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-linuxarm_1a1d843c.log
Failed on misc-compile-ppc: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-ppc_28d8e2d0.log
Failed on misc-compile-freebsd: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-freebsd_f9dcaa56.log
Failed on misc-compile-netbsd: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-netbsd_09992625.log
Failed on misc-compile-mips: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-mips_f8b4eaef.log
Failed on misc-compile-other: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-other_51d4214b.log
Failed on misc-compile-openbsd: https://storage.googleapis.com/go-build-log/f44f1901/misc-compile-openbsd_2c11afbb.log

Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 3d30c48) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/301709 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 2: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go Bot:

Patch Set 2:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=3bc0df2c


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go Bot:

Patch Set 2: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 2: Code-Review+2

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Zhang Boyang:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Emmanuel Odeke:

Patch Set 2: Trust+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Mar 23, 2021
Currently, the go resolver always send two DNS queries (A and AAAA) even
if tcp4/udp4/ip4 or tcp6/udp6/ip6 is used. This can cause unwanted
latencies when making IPv4-only or IPv6-only connections.

This change make go resolver aware of network parameter. Now, only one A
query is sent when tcp4/udp4/ip4 is used, and vice versa for
tcp6/udp6/ip6.

Fixes #45024

Change-Id: I815f909e6df5f7242cfc900f7dfecca628c3a2c8
GitHub-Last-Rev: 3d30c48
GitHub-Pull-Request: #45016
Reviewed-on: https://go-review.googlesource.com/c/go/+/301709
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Trust: Emmanuel Odeke <[email protected]>
@gopherbot
Copy link
Contributor

Message from Zhang Boyang:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/301709.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/301709 has been merged.

@gopherbot gopherbot closed this Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

net: Dial always query DNS for both A and AAAA even if network is tcp4 or tcp6 when pure Go resolver is used
2 participants