net: Using multiple resolvers shows unexpected results while used concurrently #22908
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.2 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I'm trying to use custom resolvers to resolve the same
host
using concurrent goroutines. The current pure go resolver uses a globallookupGroup
which merges LookupIPAddr calls together for lookups for the same host. As a result only one of the resolvers is used to permform the dns lookup but the result is shared by all the resolvers.Example code: http://play.golang.org/p/eyR2mhBs1C
What did you expect to see?
I'm expecting each resolver to dial for its own lookups
What did you see instead?
This is the output of the example script:
Proposal
Maybe the
lookupGroup
should be local the resolver so that each resolver is really independent.The text was updated successfully, but these errors were encountered: