You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "tianhang tang (Jira)" <ji...@apache.org> on 2020/11/17 12:51:00 UTC

[jira] [Created] (HBASE-25299) Scan#setRowPrefixFilter Unexpected behavior

tianhang tang created HBASE-25299:
-------------------------------------

             Summary: 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


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)