You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org> on 2013/05/09 02:39:18 UTC

[jira] [Updated] (HBASE-3852) ThriftServer leaks scanners

     [ https://issues.apache.org/jira/browse/HBASE-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Daniel Cryans updated HBASE-3852:
--------------------------------------

    Attachment: HBASE-3852-0.94.patch

Attaching patch.

It got a lot messier then I expected but that's because I forgot that that code relies on the new scanner stuff that we used at SU.

So kind, of like the thrift2 patch, I use a wrapper for the scanners. This is what you store in the scanner map. When you use it you first remove it from the map and then later you put it back with a new timestamp.

Removing the scanner from the list has 2 nice properties: we don't race when scanner the map for timeouts and if you hit this code in scannerGetList:

{code}
if (null == results) {
  return new ArrayList<TRowResult>();
}
{code}

Then the scanner is already removed from the map so the leak there is fixed too.
                
> ThriftServer leaks scanners
> ---------------------------
>
>                 Key: HBASE-3852
>                 URL: https://issues.apache.org/jira/browse/HBASE-3852
>             Project: HBase
>          Issue Type: Bug
>          Components: Thrift
>    Affects Versions: 0.90.2
>            Reporter: Jean-Daniel Cryans
>         Attachments: 3852.txt, HBASE-3852-0.94.patch, thrift2-scanner.patch
>
>
> The scannerMap in ThriftServer relies on the user to clean it by closing the scanner. If that doesn't happen, the ResultScanner will stay in the thrift server's memory and if any pre-fetching was done, it will also start accumulating Results (with all their data).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira