You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ChiaPing Tsai (JIRA)" <ji...@apache.org> on 2016/06/25 20:09:37 UTC

[jira] [Created] (HBASE-16113) The raw scan with "zero" max versions should return empty result

ChiaPing Tsai created HBASE-16113:
-------------------------------------

             Summary: The raw scan with "zero" max versions should return empty result
                 Key: HBASE-16113
                 URL: https://issues.apache.org/jira/browse/HBASE-16113
             Project: HBase
          Issue Type: Bug
            Reporter: ChiaPing Tsai
            Priority: Trivial


Step 1: put a cell
Step 2: delete the cell
Step 3: Scan#setRaw(true).setMaxVersions(0)
Step 4: Result result = table.getScanner(scan).next()
Step 5: The result will contain a Cell of DELETE type
Is it a correct result ? The critical code is shown below:
{code:title=ScanWildcardColumnTracker.java|borderStyle=solid}
// May be we should check the verion first
  private MatchCode checkVersion(byte type, long timestamp) {
    if (!CellUtil.isDelete(type)) {
      currentCount++;
    }
    if (currentCount > maxVersions) {
      return ScanQueryMatcher.MatchCode.SEEK_NEXT_COL; // skip to next col
    }
    // keep the KV if required by minversions or it is not expired, yet
    if (currentCount <= minVersions || !isExpired(timestamp)) {
      setTSAndType(timestamp, type);
      return ScanQueryMatcher.MatchCode.INCLUDE;
    } else {
      return MatchCode.SEEK_NEXT_COL;
    }

  }
{code}
Comments?
Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)