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

Query optimizations #24

Merged
merged 3 commits into from
Aug 10, 2014
Merged

Query optimizations #24

merged 3 commits into from
Aug 10, 2014

Conversation

tarnfeld
Copy link
Contributor

@tarnfeld tarnfeld commented Aug 9, 2014

There were a few bugs causing DNS queries to make etcd queries that weren't required.

All answers are guaranteed to be processed because the WaitGroup won't be released until the answers channel is clear.
@@ -109,7 +109,7 @@ func (r *Resolver) Lookup(req *dns.Msg) (msg *dns.Msg) {

// If we failed to find any answers, let's keep looking up the tree for
// any wildcard domain entries.
if len(answers) == 0 {
if len(msg.Answer) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah. Great example of how strong-typing and compile-time checks don't always save you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah exactly, concurrent programming how does it work!

tarnfeld added a commit that referenced this pull request Aug 10, 2014
@tarnfeld tarnfeld merged commit ad8258c into master Aug 10, 2014
@tarnfeld tarnfeld deleted the fix/query-optimizations branch August 10, 2014 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants