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: native unix dns lookup retries unnecessarily #8616

Closed
gopherbot opened this issue Aug 29, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@gopherbot
Copy link

commented Aug 29, 2014

by alex@lx.lc:

In dnsclient_unix.go, the lookup function needs to be cleaned up.

Currently, in certain cases, lookups are tried twice unnecessarily.  

A lookup is tried twice if it
1 - has more dots than ndots
2 - is not rooted (doesn't end with .)
3 - returns any error(including NXDOMAIN).

This leads to ALL nosuchhost lookups being tried twice necessarily basically.
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2014

Comment 1:

Labels changed: added repo-main, release-none.

@gopherbot

This comment has been minimized.

Copy link
Author

commented Aug 29, 2014

Comment 2 by alski85:

Have patch for this, will submit CL soon.
@gopherbot

This comment has been minimized.

Copy link
Author

commented Aug 29, 2014

Comment 3 by alex@lx.lc:

Have patch for this, will submit CL soon.
@gopherbot

This comment has been minimized.

Copy link
Author

commented Aug 29, 2014

Comment 4:

CL https://golang.org/cl/137870043 mentions this issue.
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2014

Comment 5:

This issue was closed by revision 854dbb7.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016

wheatman added a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018

net: ensure identical queries are not sent multiple times in builtin …
…stub resolver

Prevents non-rooted queries with > ndots dots from being tried twice on error.
Fixes golang#8616.

Benchmark results on linux/amd64
benchmark                        old ns/op    new ns/op    delta
BenchmarkGoLookupIPNoSuchHost      8212394      4413293  -46.26%

benchmark                       old allocs   new allocs    delta
BenchmarkGoLookupIPNoSuchHost          216          108  -50.00%

benchmark                        old bytes    new bytes    delta
BenchmarkGoLookupIPNoSuchHost        17460         8726  -50.02%

LGTM=iant, mikioh.mikioh
R=golang-codereviews, iant, mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/137870043

wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018

net: ensure identical queries are not sent multiple times in builtin …
…stub resolver

Prevents non-rooted queries with > ndots dots from being tried twice on error.
Fixes golang#8616.

Benchmark results on linux/amd64
benchmark                        old ns/op    new ns/op    delta
BenchmarkGoLookupIPNoSuchHost      8212394      4413293  -46.26%

benchmark                       old allocs   new allocs    delta
BenchmarkGoLookupIPNoSuchHost          216          108  -50.00%

benchmark                        old bytes    new bytes    delta
BenchmarkGoLookupIPNoSuchHost        17460         8726  -50.02%

LGTM=iant, mikioh.mikioh
R=golang-codereviews, iant, mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/137870043

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.