Skip to content

Use AuthoritativeDnsServerCache for creating the new redirect stream.#8316

Merged
normanmaurer merged 2 commits into4.1from
redirect_servers
Sep 27, 2018
Merged

Use AuthoritativeDnsServerCache for creating the new redirect stream.#8316
normanmaurer merged 2 commits into4.1from
redirect_servers

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

At the moment if a user wants to provide custom sorting of the nameservers used for redirects it needs to be implemented in two places. This is more complicated as it needs to be.

Modifications:

  • Just delegate to the AuthoritativeDnsServerCache always as we fill it before we call newRedirectDnsServerStream anyway.

Result:

Easier way for the user to implement custom sorting.

Motivation:

At the moment if a user wants to provide custom sorting of the nameservers used for redirects it needs to be implemented in two places. This is more complicated as it needs to be.

Modifications:

- Just delegate to the AuthoritativeDnsServerCache always as we fill it before we call newRedirectDnsServerStream anyway.

Result:

Easier way for the user to implement custom sorting.
DnsServerAddressStream cached = authoritativeDnsServerCache().get(hostname);
if (cached == null || cached.size() == 0) {
// If there is not cache hit (which may be the case for example when a NoopAuthoritativeDnsServerCache
// is used we will just directly use the provided nameservers.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing closing parenthesis and comma before 'we will'. i.e. is used), we will

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep... anything else?

@normanmaurer
Copy link
Copy Markdown
Member Author

@trustin addressed

@normanmaurer normanmaurer merged commit b81c8ed into 4.1 Sep 27, 2018
@normanmaurer normanmaurer deleted the redirect_servers branch September 27, 2018 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants