Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D947106BD for ; Fri, 14 Mar 2014 10:29:55 +0000 (UTC) Received: (qmail 62318 invoked by uid 500); 14 Mar 2014 10:29:52 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 61591 invoked by uid 500); 14 Mar 2014 10:29:49 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 61438 invoked by uid 99); 14 Mar 2014 10:29:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2014 10:29:48 +0000 Date: Fri, 14 Mar 2014 10:29:47 +0000 (UTC) From: "ramkrishna.s.vasudevan (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-10749) CellComparator.compareStatic() compares type wrongly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 ramkrishna.s.vasudevan created HBASE-10749: ---------------------------------------------- Summary: 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.96.1.1, 0.98.1, 0.99.0 Reporter: ramkrishna.s.vasudevan Assignee: ramkrishna.s.vasudevan Priority: Critical Fix For: 0.98.1, 0.99.0 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)