phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4467) Scans with filter returning all the versions
Date Wed, 27 Dec 2017 10:34:03 GMT

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

Anoop Sam John commented on PHOENIX-4467:
-----------------------------------------

When the Filter returned INCLUDE_AND_NEXT_COL, we make MatchCode as INCLUDE_AND_SEEK_NEXT_COL.
And u r right that this case we are not incrementing the versions count and check it against
Scan max versions. But this return match code itself says we are done with this col. So in
StoreScanner, u can see when this is the MatchCode, we will skip all the cells in same column
or seek to the next column. Means the cells in same column (old versions) are not been passed
to Filters or matchers and not included into the return Cells list.  So am not very sure where
is the issue then.

> Scans with filter returning all the versions
> --------------------------------------------
>
>                 Key: PHOENIX-4467
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4467
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Ankit Singhal
>            Assignee: Ankit Singhal
>              Labels: HBase-2.0
>             Fix For: 5.0.0
>
>         Attachments: PHOENIX-4467_workaround.patch
>
>
> Even if we set max versions in the scan to 1, HBase is still returning all the versions
if there is a filter.
> It seems to be a side-effect of HBASE-17125. where if INCLUDE_AND_NEXT_COL is the return
code from the filter, we are not checking the version of the cell even though the documentation
says.
> {code}
> @InterfaceAudience.Public
>   public enum ReturnCode {
>     /**
>      * Include the Cell
>      */
>     INCLUDE,
>     /**
>      * Include the Cell and seek to the next column skipping older versions.
>      */
>     INCLUDE_AND_NEXT_COL,
> }
> {code}
> In UserScanQueryMatcher#mergeFilterResponse()
> {code}
> case INCLUDE_AND_NEXT_COL:
>         if (matchCode == MatchCode.INCLUDE) {
>           matchCode = MatchCode.INCLUDE_AND_SEEK_NEXT_COL;
>         }
>         break;
>  if (matchCode == MatchCode.INCLUDE_AND_SEEK_NEXT_COL
>         || matchCode == MatchCode.INCLUDE_AND_SEEK_NEXT_ROW) {
>       return matchCode;
>     }
>     // Now we will check versions again.
>     if (curColCell == null || !CellUtil.matchingRowColumn(cell, curColCell)) {
>       count = 0;
>       curColCell = cell;
>     }
>     count += 1;
>     return count > versionsAfterFilter ? MatchCode.SEEK_NEXT_COL : MatchCode.INCLUDE;
> {code}
> [~anoopsamjohn], It could be a bug in HBase



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message