Andras Erdei created ZOOKEEPER-2441:
---------------------------------------
Summary: C API maps getaddrinfo() transient and permanent failures
to the same value
Key: ZOOKEEPER-2441
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2441
Project: ZooKeeper
Issue Type: Bug
Environment: Linux
Reporter: Andras Erdei
https://github.com/apache/zookeeper/blob/trunk/src/c/src/zookeeper.c#L560
maps getaddrinfo() return values indicating a transient failure (e.g.
EAI_AGAIN) to same value (EINVAL) that zookeeper_init() uses to indicate
permanent problems (like empty host spec or invalid port).
As a result client code has no way to decide whether it should re-try the
initialization or abort (asking for manual intervention).
As discussed e.g. in https://issues.apache.org/jira/browse/MESOS-3790 zookeeper
should most likely retry on this and other transient failures automagically.
Independently, the switch above should be fixed to map EAI_* values to
different E* values allowing client code some flexibility in handling and
reporting errors deemed permanent by zookeeper.
Note that there is a related bug
https://issues.apache.org/jira/browse/ZOOKEEPER-1451 -- zookeeper also does not
report the problem properly in its own logs, making debugging these problems
even harder.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)