From issues-return-3320-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Dec 11 10:40:08 2018 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 19E361807A5 for ; Tue, 11 Dec 2018 10:40:05 +0100 (CET) Received: (qmail 17919 invoked by uid 500); 11 Dec 2018 09:40:05 -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 17776 invoked by uid 99); 11 Dec 2018 09:40:05 -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; Tue, 11 Dec 2018 09:40:05 +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 D7777180D18 for ; Tue, 11 Dec 2018 09:29:05 +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 RAWg8eMUjxAu for ; Tue, 11 Dec 2018 09:29:04 +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 469A15FB2C for ; Tue, 11 Dec 2018 09:29:02 +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 77D5AE2666 for ; Tue, 11 Dec 2018 09:29:01 +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 9D86625305 for ; Tue, 11 Dec 2018 09:29:00 +0000 (UTC) Date: Tue, 11 Dec 2018 09:29:00 +0000 (UTC) From: "Hadoop QA (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= 716652#comment-16716652 ]=20 Hadoop QA commented on PHOENIX-5055: ------------------------------------ {color:red}-1 overall{color}. Here are the results of testing the latest a= ttachment=20 http://issues.apache.org/jira/secure/attachment/12951315/PHOENIX-5055-4.x= -HBase-1.4-v4.patch against 4.x-HBase-1.4 branch at commit f0881a137c9b1a020d807f4d1651ca139e= e1a7be. ATTACHMENT ID: 12951315 {color:green}+1 @author{color}. The patch does not contain any @author= tags. {color:green}+1 tests included{color}. The patch appears to include 3 = new or modified tests. {color:green}+1 javac{color}. The applied patch does not increase the = total number of javac compiler warnings. {color:red}-1 release audit{color}. The applied patch generated 1 rele= ase audit warnings (more than the master's current 0 warnings). {color:red}-1 lineLengths{color}. The patch introduces the following l= ines longer than 100: + try (PhoenixConnection conn =3D DriverManager.getConnection(ge= tUrl(), props).unwrap(PhoenixConnection.class)) { + conn.createStatement().executeUpdate("CREATE INDEX " + indexNa= me + " on " + tableName + " (C) INCLUDE(D)"); + conn.createStatement().executeUpdate("UPSERT INTO " + tableNa= me + "(A,B,C,D) VALUES ('A2','B2','C2','D2')"); + conn.createStatement().executeUpdate("UPSERT INTO " + tableNa= me + "(A,B,C,D) VALUES ('A3','B3', 'C3', null)"); + assertEquals("(" + cell.toString() + ") has differ= ent ts", ts, cell.getTimestamp()); + // set the batch size (rows) to 2 since three are at least 2 mutat= ions when updates a single row + * Split the list of mutations into multiple lists. since a single row= update can contain multiple mutations, + public static List> getMutationBatchList(long batchSize= , long batchSizeBytes, List allMutationList) { + "Mutation types are put or delete, for one row all mutatio= ns must be in one batch."); + List list =3D ImmutableList.of(new Put(r3), new Put(= r1), new Delete(r1), new Put(r2), new Put(r4), new Delete(r4)); {color:green}+1 core tests{color}. The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/2202//t= estReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Bui= ld/2202//artifact/patchprocess/patchReleaseAuditWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/2202/= /console This message is automatically generated. > 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)