Reverse DNS lookups are still slow
It would appear that only new relays are looked up. Any relay that already exists with a NodeStatus
is not looked up. I believe this is due to incorrectly recording the last lookup time even where no lookup has actually occurred.
The lack of a reverse DNS record and the failure of a lookup (including running out of time before even getting to it) all count as success and a lookup time will be recorded. This prevents the lookup being attempted again for another 12 hours.
I hadn't spotted this when testing locally as I'd always set RDNS_LOOKUP_MAX_AGE_MILLIS
to 0L
to ensure that every relay was looked up every time.
This has happened this way as I had tried to maintain backwards-bug-compatibility with the old field that returned an IP address in cases where the lookup did not find an error but also did not find a domain. The implementation wasn't strict enough in its bug compatibility because it returned an IP address also in error conditions.
I wonder if it is worth spending time to fix this here, or instead removing the host_name
field (which is optional in the spec, and we did deprecate on July 16th) and so not requiring the returning of IP addresses at all.