Blocking API used to resolve host names

Bug #662995 reported by David Mikulec on 2010-10-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle Client & Protocol Library
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
Andrew Hutchings (linuxjedi) wrote :

this could wrap in nicely with the libevent work

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
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.

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  Edit
Everyone can see this information.

Other bug subscribers