DescriptionDNS: Let requests specify a callback for future cache hits
To measure the effectiveness of various speculative DNS measures, allow
DNS requests to contain a cache hit callback that will be called every
time another request returns synchronously with cached data from the
same entry that the original request wrote or read.
To clarify, here's an example sequence of operations (assuming all
requests have callbacks set):
1. Request A resolves a name.
2. Request B resolves the same name while the result is still valid;
the resolver calls request A's cache hit callback.
3. Request C resolves the same name again; the resolver calls the
callbacks for both request A and B.
4. The cache is cleared on a network change.
5. Requests D and E both resolve the name. No callbacks are called,
since there was no result cached for either request.
6. Request F resolves the name; the resolver calls the callbacks for
requests D and E.
Notably, if multiple speculative resolutions occur, the cache hit
callbacks pile up, and future cache hits will call *all* of them.
BUG=621554
Committed: https://crrev.com/7e8bf1c42475e7bf0cf31a0cbda952cb6cae5f99
Cr-Commit-Position: refs/heads/master@{#409262}
Patch Set 1 #Patch Set 2 : rebase #Patch Set 3 : rebase #
Total comments: 8
Patch Set 4 : Make requested changes. #
Total comments: 3
Patch Set 5 : rebase, add unit test. #
Total comments: 4
Patch Set 6 : Clarify a couple comments. #
Messages
Total messages: 36 (25 generated)
|