hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10749) CellComparator.compareStatic() compares type wrongly
Date Sat, 15 Mar 2014 03:40:45 GMT

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

Hudson commented on HBASE-10749:
--------------------------------

SUCCESS: Integrated in HBase-0.98 #234 (See [https://builds.apache.org/job/HBase-0.98/234/])
HBASE-10749 CellComparator.compareStatic() compares type wrongly (Ramkrishna S. Vasudevan)
(apurtell: rev 1577767)
* /hbase/branches/0.98/hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java


> CellComparator.compareStatic() compares type wrongly
> ----------------------------------------------------
>
>                 Key: HBASE-10749
>                 URL: https://issues.apache.org/jira/browse/HBASE-10749
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.1, 0.99.0, 0.96.1.1
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Critical
>             Fix For: 0.96.2, 0.98.1, 0.99.0
>
>         Attachments: HBASE-10749.patch
>
>
> CellComparator.compareStatic(Cell a, Cell b) compares type wrongly.
> {code}
>     //type
>     c = (0xff & a.getTypeByte()) - (0xff & b.getTypeByte());
>     if (c != 0) return c;
> {code}
> In the normal case it should be the other way
> {code}
>       // Compare types. Let the delete types sort ahead of puts; i.e. types
>       // of higher numbers sort before those of lesser numbers. Maximum (255)
>       // appears ahead of everything, and minimum (0) appears after
>       // everything.
>       return (0xff & rtype) - (0xff & ltype);
> {code}
> Found this issue while replacing KVComparator to use CellComparator.  
> [~mcorgan]
> Could you confirm this once?  Currently PrefixTree code path uses this compareStatic
method.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message