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

Anoop Sam John commented on HBASE-18160:
----------------------------------------

Another side note. Again not related but we should try fix.
{code}
private Cell referenceCell = null;

  /**
   * When filtering a given Cell in {@link #filterKeyValue(Cell)},
   * this stores the transformed Cell to be returned by {@link 
#transformCell(Cell)}.
   *
   * Individual filters transformation are applied only when the filter 
includes the Cell.
   * Transformations are composed in the order specified by {@link #filters}.
   */
  private Cell transformedCell = null;
{code}
referenceCell is been kept till the next call to transformCell().  So there is 
no usage of a prev set cell after having an RPC shipped(Reaching a batch size 
or caching rows count) and so no functional problems.  Have to reset it to null 
after the check in transformCell() or else this will keep the ref to a cell 
even after it is been shipped in RPC. So keeping ref to the backing HFile block 
byte[] preventing it from GC.  A small reset one liner can avoid such a 
possible issue!
Same for transformedCell 

> Fix incorrect  logic in FilterList.filterKeyValue
> -------------------------------------------------
>
>                 Key: HBASE-18160
>                 URL: https://issues.apache.org/jira/browse/HBASE-18160
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Zheng Hu
>            Assignee: Zheng Hu
>         Attachments: HBASE-18160.branch-1.1.v1.patch, 
> HBASE-18160.branch-1.v1.patch, HBASE-18160.v1.patch, HBASE-18160.v2.patch, 
> HBASE-18160.v2.patch
>
>
> As HBASE-17678 said, there are two problems in FilterList.filterKeyValue 
> implementation: 
> 1.  FilterList did not consider INCLUDE_AND_SEEK_NEXT_ROW case( seems like 
> INCLUDE_AND_SEEK_NEXT_ROW is a newly added case, and the dev forgot to 
> consider FilterList), So if a user use INCLUDE_AND_SEEK_NEXT_ROW in his own 
> Filter and wrapped by a FilterList,  it'll  throw  an 
> IllegalStateException("Received code is not valid."). 
> 2.  For FilterList with MUST_PASS_ONE,   if filter-A in filter list return  
> INCLUDE and filter-B in filter list return INCLUDE_AND_NEXT_COL,   the 
> FilterList will return  INCLUDE_AND_NEXT_COL finally.  According to the 
> mininal step rule , It's incorrect.  (filter list with MUST_PASS_ONE choose 
> the mininal step among filters in filter list. Let's call it: The Mininal 
> Step Rule).



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

Reply via email to