hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Dimiduk (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-9893) Incorrect assert condition in OrderedBytes decoding
Date Mon, 18 Nov 2013 22:37:21 GMT

     [ https://issues.apache.org/jira/browse/HBASE-9893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Nick Dimiduk updated HBASE-9893:

    Attachment: HBASE-9893.00.patch

Excellent catch. Attached is a patch that also includes updated test cases. Please let me
know if you have other value permutations you'd like to see tested. It'd be nice to have a
more thorough test suite around this code, a la the suite Orderly has.

>From the commit message

Correct an invalid assumption in remaining assertion code around OrderedBytes#decodeVarBlob.
When an encoded value contains a 1-bit in its LSB position and the length of the encoded byte
array is divisible by 7, the value remaining in variable t will be 0x80, resulting in the
failed assertion coming out of the decoding loop. This patch preserves the assertion for the
general case by resetting 't' at the conclusion of the 7-byte cycle.

> Incorrect assert condition in OrderedBytes decoding
> ---------------------------------------------------
>                 Key: HBASE-9893
>                 URL: https://issues.apache.org/jira/browse/HBASE-9893
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.96.0
>            Reporter: He Liangliang
>            Assignee: Nick Dimiduk
>            Priority: Minor
>         Attachments: HBASE-9893.00.patch, HBASE-9893.patch
> The following assert condition is incorrect when decoding blob var byte array.
> {code}
>     assert t == 0 : "Unexpected bits remaining after decoding blob.";
> {code}
> When the number of bytes to decode is multiples of 8 (i.e the original number of bytes
is multiples of 7), this assert may fail.

This message was sent by Atlassian JIRA

View raw message