]> Cypherpunks repositories - gostls13.git/commit
net: ensure identical queries are not sent multiple times in builtin stub resolver
authorAlex A Skinner <alex@lx.lc>
Fri, 29 Aug 2014 22:50:50 +0000 (07:50 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Fri, 29 Aug 2014 22:50:50 +0000 (07:50 +0900)
commit854dbb7fdcc85ca187e4d91a5a85d392242bb1cb
treed0d5c8e58cbe1121b31b2bb3e9261e7d86ab11aa
parent858c57f5bd2170abe71cbbf505966cd648935d00
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 #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
src/pkg/net/dnsclient_unix.go
src/pkg/net/dnsclient_unix_test.go