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 633911729B for ; Mon, 2 Feb 2015 01:50:34 +0000 (UTC) Received: (qmail 32192 invoked by uid 500); 2 Feb 2015 01:50:35 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 32143 invoked by uid 500); 2 Feb 2015 01:50:35 -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 32132 invoked by uid 99); 2 Feb 2015 01:50:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Feb 2015 01:50:35 +0000 Date: Mon, 2 Feb 2015 01:50:35 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-12948) Increment#addColumn on the same column multi times produce wrong result MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-12948?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D143= 00817#comment-14300817 ]=20 Ted Yu commented on HBASE-12948: -------------------------------- I ran the new test in 0.94 and it passed. I think aligning with current behavior of 0.94 is fine. > Increment#addColumn on the same column multi times produce wrong result= =20 > ------------------------------------------------------------------------ > > Key: HBASE-12948 > URL: https://issues.apache.org/jira/browse/HBASE-12948 > Project: HBase > Issue Type: Bug > Components: Client, regionserver > Reporter: hongyu bi > Priority: Critical > Attachments: 12948-v2.patch, HBASE-12948-0.99.2-v1.patch, HBASE-1= 2948-v0.patch, HBASE-12948.patch > > > Case: > Initially get('row1'): > rowkey=3Drow1 value=3D1 > run: > Increment increment =3D new Increment(Bytes.toBytes("row1")); > for (int i =3D 0; i < N; i++) { > increment.addColumn(Bytes.toBytes("cf"), Bytes.toBytes("c"), 1) > } > hobi.increment(increment); > get('row1'): > if N=3D1 then result is 2 else if N>1 the result will always be 1 > Cause: > https://issues.apache.org/jira/browse/HBASE-7114 let increment extent mut= ation which change familyMap from NavigableMap to List, so from client side= , we can buffer many edits on the same column=EF=BC=9B > However, HRegion#increment use idx to iterate the get's results, here res= ults.size1=EF=BC=8Cso the latter edits on the sam= e column won't match the condition {idx < results.size() && CellUtil.matchi= ngQualifier(results.get(idx), kv) }, meantime the edits share the same mvcc= Version ,so this case happen. > Fix: > according to the put/delete#add on the same column behaviour , > fix from server side: process "last edit wins on the same column" inside = HRegion#increment to maintenance HBASE-7114's extension and keep the same = result from 0.94. -- This message was sent by Atlassian JIRA (v6.3.4#6332)