[
https://issues.apache.org/jira/browse/HBASE-25299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani updated HBASE-25299:
---------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Thanks for the contribution [~tangtianhang].
> Scan#setRowPrefixFilter Unexpected behavior
> -------------------------------------------
>
> Key: HBASE-25299
> URL: https://issues.apache.org/jira/browse/HBASE-25299
> Project: HBase
> Issue Type: Bug
> Components: Client, scan
> Reporter: tianhang tang
> Assignee: tianhang tang
> Priority: Major
> Fix For: 3.0.0-alpha-1
>
>
> e.g.
> startRow : "112"
> rowPrefixFilter : "11"
> The Result of this scan might contains : "111", which unexpected.
> {code:java}
> public Scan setRowPrefixFilter(byte[] rowPrefix) {
> if (rowPrefix == null) {
> setStartRow(HConstants.EMPTY_START_ROW);
> setStopRow(HConstants.EMPTY_END_ROW);
> } else {
> this.setStartRow(rowPrefix);
> this.setStopRow(calculateTheClosestNextRowKeyForPrefix(rowPrefix));
> }
> return this;
> }
> {code}
>  Scan#setRowPrefixFilter achieves this function by setting startRow and
> stopRow, ignoring the situation that startRow may have been set.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)