You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "wangjingying (Jira)" <ji...@apache.org> on 2021/11/30 12:19:00 UTC

[jira] [Commented] (HBASE-26495) Limit the length of initial resultSets for HBase thrift service

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

wangjingying commented on HBASE-26495:
--------------------------------------

[~zhangduo]  Please take a look at this PR when you have time. Thank you very much !

> Limit the length of initial resultSets for HBase thrift service
> ---------------------------------------------------------------
>
>                 Key: HBASE-26495
>                 URL: https://issues.apache.org/jira/browse/HBASE-26495
>             Project: HBase
>          Issue Type: Improvement
>          Components: Thrift
>    Affects Versions: 1.4.14
>            Reporter: wangjingying
>            Priority: Major
>             Fix For: 1.4.14
>
>
> When the client requests getScannerResults or getScannerRows, set up a large numRows will cause ArrayIndexOutOfBoundsException ,and  may  cause OOM.
> For example
> {code:java}
> conn := cli.(*hbase.THBaseServiceClient)
> tscan := &hbase.TScan{
>    StartRow: []byte("prefix_1"),
>    StopRow:  []byte("prefix_2"),
>    Columns: []*hbase.TColumn{
>       {
>          Family:    []byte("N"),
>          Qualifier: []byte("title"),
>       },
>    },
> }
> scanresult, err := conn.GetScannerResults([]byte("rowkey1"), tscan, 10000000){code}
> Here initialize the length of resultSets using the minimum value of "hbase.thrift.max.scanner.results.init.length"  and numRows。



--
This message was sent by Atlassian Jira
(v8.20.1#820001)