]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-libadmin-minimize-dns-lookups-20071003
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 3 Oct 2007 16:29:28 +0000 (16:29 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 3 Oct 2007 16:29:28 +0000 (16:29 +0000)
commit7047852032888d73c7933b0e7511df0aa7bd2ad6
tree617160301edec96237dc217387c7a934cf9e3154
parent11bec8254cbdfac4b19f8252a129582a59ecad28
DEVEL15-libadmin-minimize-dns-lookups-20071003

Some cells have a large number of servers listed in the vldb that
no longer exist and/or do not have PTR records in DNS.  The algorithm
used to obtain the "server names" from IP addresses involves opening
a cell handle, creating an iterator of all servers, and then iterating
over them until a match is found for the IP address.  This is done for
every server reference.  Each time the iterator was constructed the
vldb would be queried and gethostbyaddr() would be called on every listed
ip address.

This patch stores a copy of the server list in the cell handle along with
an expiration time generated from a 10 minute TTL.  This significant
reduces but does not eliminate the number of times that the caller is
blocked on reverse dns lookups.

(cherry picked from commit a7abca15b09561a0d9fda11c0cb99c9edd535d1d)
src/libadmin/adminutil/afs_AdminInternal.h
src/libadmin/client/afs_clientAdmin.c