Skip to content

dns cache: return host info in in-cache case of loadDnsCacheEntry#15498

Merged
snowp merged 2 commits intoenvoyproxy:mainfrom
chradcliffe:return-in-cache-dns-result
Mar 17, 2021
Merged

dns cache: return host info in in-cache case of loadDnsCacheEntry#15498
snowp merged 2 commits intoenvoyproxy:mainfrom
chradcliffe:return-in-cache-dns-result

Conversation

@chradcliffe
Copy link
Copy Markdown
Contributor

Commit Message:
This is a follow-up to #15144 -- this change makes loadDnsCacheEntry return the requested DNS host info when the host info is already in the cache. This allows client code to avoid a second lookup when the host info is needed.

Additional Description: N/A
Risk Level: low - adding field to existing return struct
Testing: manual, unit testing
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

This is a follow-up to envoyproxy#15144 that returns the requested DNS host info
when the host info was already in the cache, which avoids a second
lookup when the client code wants information from the cache.

Signed-off-by: Craig Radcliffe <[email protected]>
@jmarantz
Copy link
Copy Markdown
Contributor

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #15498 (comment) was created by @jmarantz.

see: more, trace.

alyssawilk
alyssawilk previously approved these changes Mar 16, 2021
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

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

Looks right to me! Should there be a test case where we verify that we get absl::nullopt back? Seems like all the added expectations assume non-empty host_info_.

@chradcliffe
Copy link
Copy Markdown
Contributor Author

Looks right to me! Should there be a test case where we verify that we get absl::nullopt back? Seems like all the added expectations assume non-empty host_info_.

Added these assertions to existing tests in 13ca77f

@chradcliffe chradcliffe requested a review from snowp March 17, 2021 14:54
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

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

Thanks!

@snowp snowp merged commit 779a663 into envoyproxy:main Mar 17, 2021
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.

4 participants