This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #13928] Use minimum ttl value from dns query
On Fri, Mar 30, 2012 at 1:04 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> All of what you said would have been perfect if:
>
> 1) We could query just a single dns resource from the server and update
> the 'stale link' as it were, like a caching dns server would
> 2) nscd was implemented to cache host names as a caching dns server.
This is what I figured you'd say since it seemed the only rational
reason to have posted the patch.
In the future an explanation like the one you just provided would have
helped immensely in reviewing the original patch.
> Now since the single record that nscd has can consist of multiple
> linked DNS resources and nscd has to decide on a time when it considers
> this record as stale, it should be obvious that the minimum TTL among
> the resources be used because it is at that minimum TTL that the
> record in nscd cache is no longer valid.
Given that the cache is the *group* of linked queries the *group*
expires when any single entry expires, so I agree that the minimum TTL
of the group dictates the entry expiry.
I'll review your final patch next.
Cheers,
Carlos.