[ 
https://issues.apache.org/jira/browse/HBASE-21007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571718#comment-16571718
 ] 

Bosko Devetak commented on HBASE-21007:
---------------------------------------

Hi [~apurtell],

I uploaded the formatted patch.

As for the unit tests, the problem is how to get the number of currently opened 
scanners. I looked at the code and from what I managed to understand the 
stateful scanners are all referenced from the ScannerResource class, so for 
them its easy to get the number of currently open instances. However for 
stateless scanners, there is no such tracking, or at least I haven't found it. 
If this would exist, than it would be easy to add a unit test. Maybe extending 
the resource tracking to the stateless scanners should be a separate feature 
request?

 

> Memory leak in HBase rest server
> --------------------------------
>
>                 Key: HBASE-21007
>                 URL: https://issues.apache.org/jira/browse/HBASE-21007
>             Project: HBase
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 1.4.0, 1.4.6
>            Reporter: Bosko Devetak
>            Assignee: Bosko Devetak
>            Priority: Critical
>         Attachments: HBASE-21007.001.patch, HBASE-21007.002.patch
>
>
> When using the URIs like this:
>  
>           /sometable/*?limit=$limit&startrow=$startrow&endrow=$endrow
>  
> where *$limit* is smaller than the range between *$startrow* and *$endrow*, 
> the rest server will start leaking memory.
>  
>  
> The bug is in the *TableScanResource.java* class. Basically, the 
> ResultScanner is not being closed in next() method when the limit has been 
> reached.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to