[
https://issues.apache.org/jira/browse/PHOENIX-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169169#comment-14169169
]
rajeshbabu commented on PHOENIX-1314:
-------------------------------------
[~lhofhansl]
bq. Filters are instantiated per store scanner, and with in a store scanner we
should avoid reseeking backwards. Note the *re*seek. Seeking is always OK,
reseeking should only go forward.
Filters are shared between the store scanners in region scanner at RS. I have
not seen any where copying the scan so that each scanner sees it's own filter
or am I missing some thing?
When filter gives hint then reseek happening on one store scanner but still
others reading the rows less than hint. Since the filter is shared there are
mismatches seek hints order.
With the assertion normal query with in list is failing.
{code}
0: jdbc:phoenix:10.18.40.169> select * from t;
+------------+---------+------------+------------+------------+--------------+-----------+------------+------------+--------------+--------------+-----------+------------+---------+
| VARCHAR_PK | CHAR_PK | INT_PK | LONG_PK | DECIMAL_PK | VARCHAR_COL1 |
CHAR_COL1 | INT_COL1 | LONG_COL1 | DECIMAL_COL1 | VARCHAR_COL2 | CHAR_COL2 |
INT_COL2 | LONG_CO |
+------------+---------+------------+------------+------------+--------------+-----------+------------+------------+--------------+--------------+-----------+------------+---------+
| varchar1 | char1 | 1 | 1 | 1.1 | varchar_a |
chara | 2 | 2 | 2.1 | varchar_b | charb |
3 | 3 |
| varchar2 | char2 | 2 | 2 | 2.2 | varchar_a |
chara | 3 | 3 | 3.2 | varchar_b | charb |
4 | 4 |
| varchar3 | char3 | 3 | 3 | 3.3 | varchar_a |
chara | 4 | 4 | 4.3 | varchar_b | charb |
5 | 5 |
| varchar4 | char2 | 2 | 2 | 2.2 | varchar_a |
chara | 3 | 3 | 3.2 | varchar_b | charb |
4 | 4 |
| varchar5 | char2 | 2 | 2 | 2.2 | varchar_a |
chara | 3 | 3 | 3.2 | varchar_b | charb |
4 | 4 |
| varchar6 | char2 | 2 | 2 | 2.2 | varchar_a |
chara | 3 | 3 | 3.2 | varchar_b | charb |
4 | 4 |
| varchar7 | char2 | 2 | 2 | 2.2 | varchar_a |
chara | 3 | 3 | 3.2 | varchar_b | charb |
4 | 4 |
+------------+---------+------------+------------+------------+--------------+-----------+------------+------------+--------------+--------------+-----------+------------+---------+
7 rows selected (0.38 seconds)
0: jdbc:phoenix:10.18.40.169> select * from t where VARCHAR_PK in
('varchar4','varchar7');
+------------+---------+------------+------------+------------+--------------+-----------+------------+------------+--------------+--------------+-----------+------------+---------+
| VARCHAR_PK | CHAR_PK | INT_PK | LONG_PK | DECIMAL_PK | VARCHAR_COL1 |
CHAR_COL1 | INT_COL1 | LONG_COL1 | DECIMAL_COL1 | VARCHAR_COL2 | CHAR_COL2 |
INT_COL2 | LONG_CO |
+------------+---------+------------+------------+------------+--------------+-----------+------------+------------+--------------+--------------+-----------+------------+---------+
java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixIOException:
org.apache.phoenix.exception.PhoenixIOException:
org.apache.hadoop.hbase.DoNotRetryIOException:
T,,1412956395992.5d8da834b20b263a3792670a73c3745f.: next hint must come after
previous hint (prev=varchar7//LATEST_TIMESTAMP/Maximum/vlen=0/mvcc=0,
next=varchar7//LATEST_TIMESTAMP/Maximum/vlen=0/mvcc=0,
kv=varchar5\x00char2\x80\x00\x00\x02\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFD\xC1\x03\x15/B:CHAR_COL2/1413195514822/Put/vlen=5/mvcc=25)
at
org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:83)
at
org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:51)
at
org.apache.phoenix.coprocessor.ScanRegionObserver$2.nextRaw(ScanRegionObserver.java:381)
at
org.apache.phoenix.coprocessor.DelegateRegionScanner.nextRaw(DelegateRegionScanner.java:76)
at
org.apache.hadoop.hbase.regionserver.HRegionServer.scan(HRegionServer.java:3157)
at
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:29497)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2027)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:98)
at
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:114)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:94)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.AssertionError: next hint must come after previous hint
(prev=varchar7//LATEST_TIMESTAMP/Maximum/vlen=0/mvcc=0,
next=varchar7//LATEST_TIMESTAMP/Maximum/vlen=0/mvcc=0,
kv=varchar5\x00char2\x80\x00\x00\x02\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFD\xC1\x03\x15/B:CHAR_COL2/1413195514822/Put/vlen=5/mvcc=25)
at
org.apache.phoenix.filter.SkipScanFilter.setNextCellHint(SkipScanFilter.java:156)
at
org.apache.phoenix.filter.SkipScanFilter.filterKeyValue(SkipScanFilter.java:131)
at
org.apache.hadoop.hbase.regionserver.ScanQueryMatcher.match(ScanQueryMatcher.java:410)
at
org.apache.hadoop.hbase.regionserver.StoreScanner.next(StoreScanner.java:469)
at
org.apache.hadoop.hbase.regionserver.KeyValueHeap.next(KeyValueHeap.java:140)
at
org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.populateResult(HRegion.java:3937)
at
org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextInternal(HRegion.java:4017)
at
org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:3885)
at
org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:3876)
at
org.apache.phoenix.coprocessor.ScanRegionObserver$2.nextRaw(ScanRegionObserver.java:368)
{code}
> Assertion tripped for skip scan with two unit tests
> ---------------------------------------------------
>
> Key: PHOENIX-1314
> URL: https://issues.apache.org/jira/browse/PHOENIX-1314
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.1
> Reporter: James Taylor
> Assignee: rajeshbabu
> Attachments: PHOENIX-1314.patch, Phoenix-1314_3.0.patch
>
>
> After checking in a pretty sizeable change
> (https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=commit;h=d018cc1c6e01d9836de6e67af4f8b91de3269bfd),
> the assert in SkipScanFilter.setNextCellHint() started getting tripped for
> the following unit tests:
> - DeleteIT.testDeleteAllFromTableWithIndexNoAutoCommitNoSalting()
> - MutableIndexIT.testCoveredColumnUpdatesWithLocalIndex()
> The tests seem to pass without this assert (not sure what HBase does if the
> seek next hint is the same as the current row), but it would be good to get
> to the bottom of this. Would you mind taking a look, [~rajesh23]? It's
> possibly related to PHOENIX-1313.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)