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

While connecting to drill-bits using JDBC Driver through Zookeeper, a lot of "Curator-Framework-0" threads are created if connection to drill-bit is not successful(no drill-bits are up/reachable)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.12.0
    • 1.13.0
    • Client - JDBC
    • Centos 65, Java 7, Drill JDBC 1.12.0

    • Patch, Important

    Description

      I am using Drill JDBC driver 1.12.0 to connect to MapR-DB. I am finding the available drill-bits using Zookeepers. When drill-bits are not up or not reachable, the connection is failed with exception: "Failure in connecting to Drill: oadd.org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client", which is expected, but number of threads created by ZKClusterCoordinator just keeps on increasing.

      Steps to reproduce the issue

      1. Setup a connection with a drill-bit using Apache Drill JDBC driver 1.12.0 through Zookeeper hosts(port 5181)
      2. Now stop the drill-bit services or block the drill-bit IPs using iptable rules
      3. Truncate catalina logs
      4. Try to connect to the drill-bit/hit a code path that requires connection to drill-bits.
      5. Take thread dump using kill -QUIT <java process id>
      6. grep -c "Curator-Framework-0" catalina.out

      Observe that the curator framework thread just keep on accumulating

      RCA:

      1. ZKClusterCoordinator creates curator threads in the constructor
      2. ZKClusterCoordinator is instantiated by DrillClient.connect
      3. DrillClient.connect is called in DrillConnectionImpl constructor

      Fix:

      Call DrillConnectionImpl .cleanup() from all the catch blocks in the DrillConnectionImpl  constructor.

       

       

       

      Attachments

        Issue Links

          Activity

            People

              milindt Milind Takawale
              milindt Milind Takawale
              Arina Ielchiieva Arina Ielchiieva
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 48h
                  48h
                  Remaining:
                  Remaining Estimate - 48h
                  48h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified