hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guanghao Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17958) Avoid passing unexpected cell to ScanQueryMatcher when optimize SEEK to SKIP
Date Thu, 27 Apr 2017 06:28:04 GMT

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

Guanghao Zhang commented on HBASE-17958:
----------------------------------------

bq. Just like what we have done when switching rows.
You mean the stickyNextRow flag?
{code}
    // if row key is changed, then we know that we have moved over to the next row
    if (rowComparator.compareRows(currentRow, cell) != 0) {
      return MatchCode.DONE;
    }
    // optimize case.
    if (this.stickyNextRow) {
      return MatchCode.SEEK_NEXT_ROW;
    }
{code}
The current code in ScanQueryMatcher's preCheck method. Even SQM has the stickyNextRow flag,
it still compare row first.

> Avoid passing unexpected cell to ScanQueryMatcher when optimize SEEK to SKIP
> ----------------------------------------------------------------------------
>
>                 Key: HBASE-17958
>                 URL: https://issues.apache.org/jira/browse/HBASE-17958
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>         Attachments: 0001-add-one-ut-testWithColumnCountGetFilter.patch, HBASE-17958-v1.patch,
HBASE-17958-v2.patch, HBASE-17958-v3.patch
>
>
> {code}
> ScanQueryMatcher.MatchCode qcode = matcher.match(cell);
> qcode = optimize(qcode, cell);
> {code}
> The optimize method may change the MatchCode from SEEK_NEXT_COL/SEEK_NEXT_ROW to SKIP.
But it still pass the next cell to ScanQueryMatcher. It will get wrong result when use some
filter, etc. ColumnCountGetFilter. It just count the  columns's number. If pass a same column
to this filter, the count result will be wrong. So we should avoid passing cell to ScanQueryMatcher
when optimize SEEK to SKIP.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message