Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5316

C++ Client Crashes When drillbitsVector.count is 0 after zoo_get_children completed with ZOK

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      When connecting to drillbit with Zookeeper, occasionally the C++ client would crash without any reason.

      A further look into the code revealed that during this call
      rc=zoo_get_children(p_zh.get(), m_path.c_str(), 0, &drillbitsVector);

      zoo_get_children returns ZOK (0) but drillbitsVector.count is 0.
      This causes drillbits to stay empty and thus
      causes err = zook.getEndPoint(drillbits[drillbits.size() -1], endpoint); to crash

      Size check should be done to prevent this from happening

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rhou Robert Hou
            robertw Rob Wu
            Robert Hou Robert Hou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment