ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1998

C library calls getaddrinfo unconditionally from zookeeper_interest

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.1
    • Component/s: c client
    • Labels:
      None

      Description

      (commented this on ZOOKEEPER-338)

      I've just noticed that we call getaddrinfo from zookeeper_interest... on every call. So from zookeeper_interest we always call update_addrs:

      https://github.com/apache/zookeeper/blob/trunk/src/c/src/zookeeper.c#L2082

      which in turns unconditionally calls resolve_hosts:

      https://github.com/apache/zookeeper/blob/trunk/src/c/src/zookeeper.c#L787

      which does the unconditional calls to getaddrinfo:

      https://github.com/apache/zookeeper/blob/trunk/src/c/src/zookeeper.c#L648

      We should fix this since it'll make 3.5.0 slower for people relying on DNS. I think this is happened as part of ZOOKEEPER-107 in which the list of servers can be updated.

      cc: Alexander Shraer, Patrick Hunt, Flavio Junqueira

        Activity

        Patrick Hunt made changes -
        Field Original Value New Value
        Fix Version/s 3.5.0 [ 12316644 ]
        Fix Version/s 3.5.1 [ 12326786 ]
        Raul Gutierrez Segales created issue -

          People

          • Assignee:
            Raul Gutierrez Segales
            Reporter:
            Raul Gutierrez Segales
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development