hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6912) Filters are not properly applied in certain cases
Date Tue, 02 Oct 2012 18:37:07 GMT

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

Lars Hofhansl commented on HBASE-6912:
--------------------------------------

I have a patch, which fixes RowFilter. But I do not like it.
Each "real" KV should through filterRowKey before it goes through filterKeyValue. That seems
to be broken in some cases (which has to do with the lazy seeking we're doing now).
                
> Filters are not properly applied in certain cases
> -------------------------------------------------
>
>                 Key: HBASE-6912
>                 URL: https://issues.apache.org/jira/browse/HBASE-6912
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.1
>            Reporter: Alex Newman
>             Fix For: 0.94.3, 0.96.0
>
>         Attachments: minimalTest.java
>
>
> Steps to reproduce:
> Create a table, load data into it. Flush the table.
> Do a scan with
> 1. Some filter which should not match the first entry in the scan
> 2. Where one specifies a family and column.
> You will notice that the first entry is returned even though it doesn't match the filter.
> It looks like the when the first KeyValue of a scan in the column from the point of view
of the code
> HRegion.java
> {code}
> } else if (kv != null && !kv.isInternal() && filterRowKey(currentRow))
{
> {code}
> Is generated by
> {code}
> public static KeyValue createLastOnRow(final byte [] row,
> final int roffset, final int rlength, final byte [] family,
> final int foffset, final int flength, final byte [] qualifier,
> final int qoffset, final int qlength) { return new KeyValue(row, roffset, rlength, family,
foffset, flength, qualifier, qoffset, qlength, HConstants.OLDEST_TIMESTAMP, Type.Minimum,
null, 0, 0); }
> {code}
> So it is always internal from that point of the code.
> Only later from within
> StoreScanner.java
> {code}
> public synchronized boolean next(List<KeyValue> outResult, int limit, String metric)
throws IOException {
> ....
> LOOP: while((kv = this.heap.peek()) != null) {
> {code}
> ( The second time through)
> Do we get the actual kv, with a proper type and timestamp. This seems to mess with filtering.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message