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

Geoffrey Jacoby commented on PHOENIX-5455:
------------------------------------------

To sum up the issue: in HBASE-22034, several HBase JIRAs were backported to 
from HBase 2.x to 1.5 and later which added strict sanity checking to 
KeyValues, the implementation class behind HBase Cells. 

Phoenix subclasses the KeyValue in IndexedKeyValue, which are written into the 
WAL in the legacy global index path so that index edits get replayed as part of 
WAL replay. Because IndexedKeyValues are really just wrappers for a Mutation, 
not, like a real KeyValue, a single Cell, they never bothered filling in all 
the fields a KeyValue is expected to. PHOENIX-5188 was an initial attempt to 
fix this, but it only covered the requirements added in one of the several 
JIRAs backported by HBASE-22034. This JIRA attempts to fix the others. 

As a side note, IndexedKeyValues really shouldn't exist (KeyValue is IA.Private 
in HBase and has been for awhile), and they're not used by the new global index 
path introduced by PHOENIX-5156. So this is something of a stopgap until we can 
deprecate the legacy path in some future release, and get rid of 
IndexedKeyValue entirely. 

> IndexedKeyValue creation fails after HBASE-22034
> ------------------------------------------------
>
>                 Key: PHOENIX-5455
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5455
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.15.0, 4.14.3
>            Reporter: Geoffrey Jacoby
>            Assignee: Geoffrey Jacoby
>            Priority: Blocker
>             Fix For: 4.15.0
>
>         Attachments: PHOENIX-5455-4.14-HBase-1.5.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> HBASE-22034 backported to branch-1 HBASE-21401 (adding several validation 
> checks to KeyValue creation) and HBASE-22032 (adding a null check for the row 
> key to KeyValue creation). It will first be released in HBase 1.5.
> In Phoenix 4.14.2 we included PHOENIX-5188, which adds logic to initialize 
> IndexedKeyValues with the appropriate row key and offsets, so that it can 
> pass the new check in HBASE-22032. However, it did not correctly handle all 
> the checks in HBASE-21401.
> When testing 4.14.3 of Phoenix with an HBase version containing HBASE-22034, 
> we see lots of errors like the following:
> java.lang.IllegalArgumentException: Overflow when reading key length at 
> position=0, KeyValueBytesHex=foo, offset=0, length=3
> This will affect the future 4.15-HBase-1.5, and as well as any future release 
> of a 4.14.3 based on HBase-1.5



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to