Open Bug 393372 Opened 17 years ago Updated 2 years ago

Replace getaddrinfo by DnsQuery native interface

Categories

(NSPR :: NSPR, enhancement)

x86
Windows 2000
enhancement

Tracking

(Not tracked)

People

(Reporter: volkmarkostka, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007082205 Minefield/3.0a8pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007082205 Minefield/3.0a8pre

Replace the old getaddrinfo call the get address info from hostnames by the native windows API DnsQuery.
I have played a bit with it and it seems to be faster and more reliable then the old call. Beside it can probable resolve the annoying "server not found" problems for users with slow dns servers. You can tell the call to ignore the local dns cache and so retry very fast without returning obsolete results from the local cache.
The API is available for W2KPro and up so if the support for older windows versions is already dropped it may be worth to change it.

Reproducible: Always




I can provide the required code if wanted.
If it is considered to implement i suggest to do the first call normally (with looking in the cache) and retrying two times (without looking in the cache) when a "server not found" error is returned.
This can probably solve the problem if the DNS server returns an error too fast.
DnsQuery will already be used by bug 14328 (if that patch is accepted). 

This bug is about repeating the same query when a "server not found" error is returned. It might work for you, but I can guarantee that many people will immediately file a bug when they discover this behavior.
The aim looks a bit different. But the result can be achieved when the patch is accepted.
The main goal here is to bypass the local cache when a DNS call is repeated.
I have tested the current behaviour and a bad result times out after 15 minutes so bypassing is essential.
The people has to watch the line to see the change. If the call is successful there is no repeat and if the first fail repeating does not add much time until the error is reported if the name is really not available.
Note that this is not about the DNS-cache in Gecko ; there's a small one to boost performance (1 minute, 20 entries), but it doesn't cache negative results (see bug 208312). This is about the DNS-cache in the operating system. It might be better to fix this behavior in the OS (if you're Microsoft at least) instead of modifying each application to ignore the cache.
sure, i'm talking about the OS DNS cache.
MS wont fix it and changing the values in the registry is not always possible or wanted. So bypassing is the best compromise (You just need to change a constant if the above mentioned patch is accepted).
People always compare to IE and IE does not has the problem. So if IE ignores the cache (which is probable) why shouldn't we do it too?
Version: unspecified → Trunk
Moving
from FireFox + OS Integration + Trunk
to NSPR + NSPR + other
Assignee: nobody → wtc
Component: OS Integration → NSPR
Product: Firefox → NSPR
QA Contact: os.integration → nspr
Version: Trunk → other
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: wtc → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.