From issues-return-3791-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Sat Jan 5 19:18:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1EC11180645 for ; Sat, 5 Jan 2019 19:18:03 +0100 (CET) Received: (qmail 14402 invoked by uid 500); 5 Jan 2019 18:18:03 -0000 Mailing-List: contact issues-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list issues@phoenix.apache.org Received: (qmail 14390 invoked by uid 99); 5 Jan 2019 18:18:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jan 2019 18:18:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C6646180E85 for ; Sat, 5 Jan 2019 18:18:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id bH4XiS8tSZw3 for ; Sat, 5 Jan 2019 18:18:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3F6BD60FA1 for ; Sat, 5 Jan 2019 18:18:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 65CA5E0E33 for ; Sat, 5 Jan 2019 18:18:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 14BFA2542C for ; Sat, 5 Jan 2019 18:18:00 +0000 (UTC) Date: Sat, 5 Jan 2019 18:18:00 +0000 (UTC) From: "Hudson (JIRA)" To: issues@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-5055) Split mutations batches probably affects correctness of index data 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/PHOENIX-5055?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 734966#comment-16734966 ]=20 Hudson commented on PHOENIX-5055: --------------------------------- ABORTED: Integrated in Jenkins build Phoenix-4.x-HBase-1.3 #301 (See [https= ://builds.apache.org/job/Phoenix-4.x-HBase-1.3/301/]) PHOENIX-5055 Split mutations batches probably affects correctness of (jaana= i: rev 1ca554c7938b59e6850163a89783797aea8466ab) * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/MutationStateI= T.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.ja= va * (edit) phoenix-core/src/test/java/org/apache/phoenix/execute/MutationStat= eTest.java * (edit) phoenix-core/src/main/java/org/apache/phoenix/execute/MutationStat= e.java > Split mutations batches probably affects correctness of index data > ------------------------------------------------------------------ > > Key: PHOENIX-5055 > URL: https://issues.apache.org/jira/browse/PHOENIX-5055 > Project: Phoenix > Issue Type: Bug > Affects Versions: 5.0.0, 4.14.1 > Reporter: jaanai > Assignee: jaanai > Priority: Critical > Fix For: 5.1.0 > > Attachments: ConcurrentTest.java, PHOENIX-5055-4.x-HBase-1.4-v2.p= atch, PHOENIX-5055-4.x-HBase-1.4-v3.patch, PHOENIX-5055-4.x-HBase-1.4-v4.pa= tch, PHOENIX-5055-v4.x-HBase-1.4.patch > > > In order to get more performance, we split the list of mutations=C2=A0int= o multiple batches in MutationSate.=C2=A0 For one upsert SQL with some null= values that will produce two type KeyValues(Put and DeleteColumn),=C2=A0 T= hese KeyValues should have the=C2=A0same timestamp so that keep on an atomi= c operation for corresponding the row key. > [^ConcurrentTest.java]=C2=A0produced some random upsert/delete SQL and co= ncurrently executed, some SQL snippets as follows: > {code:java} > 1149:UPSERT INTO ConcurrentReadWritTest(A,C,E,F,G) VALUES ('3826','2563',= '3052','3170','3767'); > 1864:UPSERT INTO ConcurrentReadWritTest(A,B,C,D,E,F,G) VALUES ('2563','49= 26','3526','678',null,null,'1617'); > 2332:UPSERT INTO ConcurrentReadWritTest(A,B,C,D,E,F,G) VALUES ('1052','25= 63','1120','2314','1456',null,null); > 2846:UPSERT INTO ConcurrentReadWritTest(A,B,C,D,G) VALUES ('1922','146',n= ull,'469','2563'); > 2847:DELETE FROM ConcurrentReadWritTest WHERE A =3D '2563=E2=80=99; > {code} > Found incorrect=C2=A0indexed data for the index tables by=C2=A0sqlline. > !https://gw.alicdn.com/tfscom/TB1nSDqpxTpK1RjSZFGXXcHqFXa.png|width=3D665= ,height=3D400! > Debugged the mutations of batches on the server side. the=C2=A0DeleteColu= mns and Puts were=C2=A0splitted into the=C2=A0different batches for the onc= e upsert,=C2=A0 the DeleteFaimly also was executed by another thread.=C2=A0= due to DeleteColumns's timestamp is larger than DeleteFaimly under multipl= e threads. > !https://gw.alicdn.com/tfscom/TB1frHmpCrqK1RjSZK9XXXyypXa.png|width=3D901= ,height=3D120! > =C2=A0 > Running the following: > {code:java} > conn.createStatement().executeUpdate( "CREATE TABLE " + tableName + " (" = + "A VARCHAR NOT NULL PRIMARY KEY," + "B VARCHAR," + "C VARCHAR," + "D VARC= HAR) COLUMN_ENCODED_BYTES =3D 0");=20 > conn.createStatement().executeUpdate("CREATE INDEX " + indexName + " on "= + tableName + " (C) INCLUDE(D)");=20 > conn.createStatement().executeUpdate("UPSERT INTO " + tableName + "(A,B,C= ,D) VALUES ('A2','B2','C2','D2')");=20 > conn.createStatement().executeUpdate("UPSERT INTO " + tableName + "(A,B,C= ,D) VALUES ('A3','B3', 'C3', null)"); > {code} > dump IndexMemStore: > {code:java} > hbase.index.covered.data.IndexMemStore(117): Inserting:\x01A3/0:D/1542190= 446218/DeleteColumn/vlen=3D0/seqid=3D0/value=3D phoenix.hbase.index.covered= .data.IndexMemStore(133): Current kv state: phoenix.hbase.index.covered.dat= a.IndexMemStore(135): KV: \x01A3/0:B/1542190446167/Put/vlen=3D2/seqid=3D5/v= alue=3DB3 phoenix.hbase.index.covered.data.IndexMemStore(135): KV: \x01A3/0= :C/1542190446167/Put/vlen=3D2/seqid=3D5/value=3DC3 phoenix.hbase.index.cove= red.data.IndexMemStore(135): KV: \x01A3/0:D/1542190446218/DeleteColumn/vlen= =3D0/seqid=3D0/value=3D phoenix.hbase.index.covered.data.IndexMemStore(135)= : KV: \x01A3/0:_0/1542190446167/Put/vlen=3D1/seqid=3D5/value=3Dx phoenix.hb= ase.index.covered.data.IndexMemStore(137): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D E= ND MemStore Dump =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > {code} > =C2=A0 > The=C2=A0DeleteColumn's=C2=A0timestamp larger than other mutations. > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)