Blocking API used to resolve host names

Bug #662995 reported by David Mikulec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle Client & Protocol Library
Triaged
Low
Andrew Hutchings

Bug Description

From the Drizzle wiki, the Drizzle Client & Protocol Library "... provides complete non-blocking I/O support", however it appears to use getaddrinfo to resolve hostnames when making connections, which is a blocking call. Can this be re-worked to be made non-blocking?

Changed in libdrizzle:
importance: Undecided → Low
assignee: nobody → Andrew Hutchings (linuxjedi)
milestone: none → 4.0
status: New → Triaged
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

this could wrap in nicely with the libevent work

Revision history for this message
Brian Aker (brianaker) wrote :

This is not hard to fix in the current code. The event loop has to be modified only slightly to make it work.

Changed in libdrizzle:
milestone: 5.1.0 → 5.1.1
Changed in libdrizzle:
milestone: 5.1.1 → 5.1.2
Changed in libdrizzle:
milestone: 5.1.2 → 5.1.3
Revision history for this message
Wim Lewis (wiml-omni) wrote :

I think c-ares <http://c-ares.haxx.se/> would be a reasonable nonblocking-DNS implementation to use.

I think it would be beneficial to keep the option to use the system's getaddrinfo, though, perhaps through a 'configure' option. Sometimes compatibility with the host's quirky name resolution behavior is more important than a completely nonblocking library.

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

I was originally thinking of using the one in libevent. But that could work too.

And agree this should be a build option.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.