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 5E1AE10E71 for ; Sun, 1 Feb 2015 23:23:34 +0000 (UTC) Received: (qmail 27111 invoked by uid 500); 1 Feb 2015 23:23:35 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 27060 invoked by uid 500); 1 Feb 2015 23:23: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 27049 invoked by uid 99); 1 Feb 2015 23:23:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Feb 2015 23:23:35 +0000 Date: Sun, 1 Feb 2015 23:23:34 +0000 (UTC) From: "hongyu bi (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= 00782#comment-14300782 ]=20 hongyu bi commented on HBASE-12948: ----------------------------------- Hi Ted, i just found that according transaction isolation, since multi Increment#ad= dColumn on the same column are inside one transaction,current edit should s= ee previous edits ,which means we should merge the edits instead if "last = edit wins" on the same column . if this is true,it'll produce totally diffe= rent results to 0.94 and before. please correct me if i'm wrong thanks > 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)