Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.94.4
    • Fix Version/s: None
    • Component/s: Thrift
    • Labels:

      Description

      ThriftHBaseServiceHandler.openScanner() does this:
      1. table = pool.getTable()
      2. scanner = table.getScanner()
      3. table.close()
      4. return scanner

      While back porting the thrift server to 0.92.6, I found that table.close() calls connection.close(). Further calls to scanner.next() raise a ConnectionClosed exception. The unit tests do not catch this since they reuse an open HConnection instance.

      This might work on trunk, but depends on the implementations of HTablePool, HTable and HConnectionManager. Even with the pool wrapper, if the pool is full, table.close() may be called, which may invalidate the table. Also, HTable is not thread-safe, but they are being reused since they go back in the pool.

      I suggest storing the table handle along with the scanner.

        Issue Links

          Activity

          Devin Bayer created issue -
          Devin Bayer made changes -
          Field Original Value New Value
          Link This issue relates to HBASE-3852 [ HBASE-3852 ]
          Devin Bayer made changes -
          Labels thrift2
          Tags thrift2
          Devin Bayer made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Devin Bayer made changes -
          Attachment old-hbase-thrift-v1.patch [ 12554199 ]
          Lars George made changes -
          Link This issue relates to HBASE-8825 [ HBASE-8825 ]
          Lars George made changes -
          Parent HBASE-8818 [ 12655350 ]
          Issue Type Bug [ 1 ] Sub-task [ 7 ]
          Lars George made changes -
          Summary thrift server closes HTable of open Scanners Thrift 2 server closes HTable of open Scanners
          Lars George made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Assignee Lars George [ larsgeorge ]
          Lars George made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Lars George made changes -
          Original Estimate 4h [ 14400 ]
          Remaining Estimate 4h [ 14400 ]

            People

            • Assignee:
              Lars George
              Reporter:
              Devin Bayer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development