Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4284

Phoenix connection is not closed.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 4.8.0
    • 4.8.0
    • None

    Description

      When I call the jdbc close method, I found that the phoenix link still exists and is not closed.
      The code is as follows:

      public class TestHbaseClose {
          public static void main(String[] args) {
              Connection conn=null;
      
              for (int i = 0; i < 5; i++) {
                  try {
                      conn= PhoenixConnectionTest.getConnPhoenix();
                      System.out.println("Before is "+conn);
                      Thread.sleep(8000);
                      conn.close();
                      System.out.println("After is "+conn);
                      System.out.println(conn.isClosed());
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
              }
          }
      }
      

      The results of the print are as follows:

      Before is org.apache.phoenix.jdbc.PhoenixConnection@2fb5fe30
      After is org.apache.phoenix.jdbc.PhoenixConnection@2fb5fe30
      true
      Before is org.apache.phoenix.jdbc.PhoenixConnection@14bae047
      After is org.apache.phoenix.jdbc.PhoenixConnection@14bae047
      true
      Before is org.apache.phoenix.jdbc.PhoenixConnection@466d49f0
      After is org.apache.phoenix.jdbc.PhoenixConnection@466d49f0
      true
      Before is org.apache.phoenix.jdbc.PhoenixConnection@40021799
      After is org.apache.phoenix.jdbc.PhoenixConnection@40021799
      true
      Before is org.apache.phoenix.jdbc.PhoenixConnection@64f555e7
      After is org.apache.phoenix.jdbc.PhoenixConnection@64f555e7
      true
      

      Why is this? Is there a bug fixes in version 4.8.0?
      But the following link mentions this question:
      [ https: //issues.apache.org/jira/browse/PHOENIX-2898]

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              highfei2011@126.com Jeff Yang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: