[
https://issues.apache.org/jira/browse/HBASE-21620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726381#comment-16726381
]
Zheng Hu commented on HBASE-21620:
----------------------------------
It's a critial bug. when I run the UT without the fix, my RegionServer was
caught in an infinite loop. to be clear, it was in StoreScanner#next(...) .
the filterList return a hint cell which was even smaller than the current cell
in heap.peak(), so we got stuck here (the cpu cost too much and high load )
{code}
case SEEK_NEXT_USING_HINT:
Cell nextKV = matcher.getNextKeyHint(cell);
if (nextKV != null) {
seekAsDirection(nextKV);
NextState stateAfterSeekByHint = needToReturn(outResult);
if (stateAfterSeekByHint != null) {
return
scannerContext.setScannerState(stateAfterSeekByHint).hasMoreValues();
}
} else {
heap.next();
}
{code}
bq. What you think lads? Should it go in?
So I think we should let this go in branch-2.0 and branch2.1.
bq. The stuff that troubles me is changes like this: ... where we remove the
shouldPassCurrentCellToFilter bit in the patch.
In fact, we did not remove the shouldPassCurrentCellToFilter. I refactor the
shouldPassCurrentCellToFilter to calculateReturnCodeByPrevCellAndRC, which
means will calculate the return code when testing shouldPassCurrentCellToFilter
based on the previous return code and previous cell. you can see here:
{code}
- ReturnCode localRC = filter.filterCell(c);
+ ReturnCode localRC = calculateReturnCodeByPrevCellAndRC(filter, c,
prevCell, prevCode);
+ if (localRC == null) {
+ // Can not get return code based on previous cell and previous return
code. In other words,
+ // we should pass the current cell to this sub-filter to get the
return code, and it won't
+ // impact the sub-filter's internal state.
+ localRC = filter.filterCell(c);
+ }
{code}
Thanks.
> Problem in scan query when using more than one column prefix filter in some
> cases.
> ----------------------------------------------------------------------------------
>
> Key: HBASE-21620
> URL: https://issues.apache.org/jira/browse/HBASE-21620
> Project: HBase
> Issue Type: Bug
> Components: scan
> Affects Versions: 3.0.0, 1.5.0, 2.2.0, 1.4.8, 2.1.2, 2.0.4
> Environment: hbase-1.4.8, hbase-1.4.9
> hadoop-2.7.3
> Reporter: Mohamed Mohideen Meeran
> Assignee: Zheng Hu
> Priority: Major
> Fix For: 3.0.0, 1.5.0, 2.2.0, 1.4.10
>
> Attachments: HBASE-21620.branch-1.patch, HBASE-21620.v1.patch,
> HBaseImportData.java, file.txt, test.patch
>
>
> In some cases, unable to get the scan results when using more than one column
> prefix filter.
> Attached a java file to import the data which we used and a text file
> containing the values..
> While executing the following query (hbase shell as well as java program) it
> is waiting indefinitely and after RPC timeout we got the following error..
> Also we noticed high cpu, high load average and very frequent young gc in
> the region server containing this row...
> scan 'namespace:tablename',\{STARTROW => 'test',ENDROW => 'test', FILTER =>
> "ColumnPrefixFilter('1544770422942010001_') OR
> ColumnPrefixFilter('1544769883529010001_')"}
> ROW COLUMN+CELL
> ERROR: Call id=18,
> waitTime=60005, rpcTimetout=60000
>
> Note: Table scan operation and scan with a single column prefix filter works
> fine in this case.
> When we check the same query in hbase-1.2.5 it is working fine.
> Can you please help me on this..
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)