]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libadmin-minimize-dns-lookups-20071003
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 3 Oct 2007 16:27:53 +0000 (16:27 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 3 Oct 2007 16:27:53 +0000 (16:27 +0000)
commita7abca15b09561a0d9fda11c0cb99c9edd535d1d
treeae8f71d78e2988172a90e6aedd4d015f9a0a342e
parenta4b995b61811ccfbe0586ad8ab3c096cf817d9b7
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.
src/libadmin/adminutil/afs_AdminInternal.h
src/libadmin/client/afs_clientAdmin.c