Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ACEB8DAD8 for ; Wed, 28 Nov 2012 17:33:01 +0000 (UTC) Received: (qmail 81906 invoked by uid 500); 28 Nov 2012 17:33:00 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 81554 invoked by uid 500); 28 Nov 2012 17:33:00 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 81170 invoked by uid 99); 28 Nov 2012 17:33:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 17:33:00 +0000 Date: Wed, 28 Nov 2012 17:33:00 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: <1372400088.33769.1354123980183.JavaMail.jiratomcat@arcas> In-Reply-To: <1709486109.31213.1354081618517.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HBASE-7226) HRegion.checkAndMutate uses incorrect comparison result for <, <=, > and >= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505678#comment-13505678 ] stack commented on HBASE-7226: ------------------------------ I'm not sure your patch correct. Could you add a unit test to prove it is? Thank you Feng. > HRegion.checkAndMutate uses incorrect comparison result for <, <=, > and >= > --------------------------------------------------------------------------- > > Key: HBASE-7226 > URL: https://issues.apache.org/jira/browse/HBASE-7226 > Project: HBase > Issue Type: Bug > Components: regionserver > Affects Versions: 0.94.2 > Environment: 0.94.2 > Reporter: Feng Honghua > Priority: Minor > Fix For: 0.94.2 > > Attachments: HRegion_HBASE_7226_0.94.2.patch > > Original Estimate: 10m > Remaining Estimate: 10m > > in HRegion.checkAndMutate, incorrect comparison results are used for <, <=, > and >=, as below: > switch (compareOp) { > case LESS: > matches = compareResult <= 0; // should be '<' here > break; > case LESS_OR_EQUAL: > matches = compareResult < 0; // should be '<=' here > break; > case EQUAL: > matches = compareResult == 0; > break; > case NOT_EQUAL: > matches = compareResult != 0; > break; > case GREATER_OR_EQUAL: > matches = compareResult > 0; // should be '>=' here > break; > case GREATER: > matches = compareResult >= 0; // should be '>' here > break; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira