From issues-return-6696-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed May 8 18:35:03 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C86AA180630 for ; Wed, 8 May 2019 20:35:02 +0200 (CEST) Received: (qmail 60906 invoked by uid 500); 8 May 2019 18:35:02 -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 60896 invoked by uid 99); 8 May 2019 18:35:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 May 2019 18:35:02 +0000 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 5D98AE0095 for ; Wed, 8 May 2019 18:35: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 CF44220FEB for ; Wed, 8 May 2019 18:35:00 +0000 (UTC) Date: Wed, 8 May 2019 18:35:00 +0000 (UTC) From: "Thomas D'Silva (JIRA)" To: issues@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-5266) Client can only write on Index Table and skip data table if failure happens because of region split/move etc 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-5266?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 835802#comment-16835802 ]=20 Thomas D'Silva commented on PHOENIX-5266: ----------------------------------------- This approach looks good to me, WDYT [~abhishek.chouhan] ? > Client can only write on Index Table and skip data table if failure happe= ns because of region split/move etc > -------------------------------------------------------------------------= ----------------------------------- > > Key: PHOENIX-5266 > URL: https://issues.apache.org/jira/browse/PHOENIX-5266 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.15.0, 4.14.1, 5.1.0, 4.14.2 > Reporter: Mihir Monani > Assignee: Mihir Monani > Priority: Blocker > Fix For: 4.14.2 > > Attachments: PHOENIX-5266-4.x-HBase-1.3.01.patch, PHOENIX-5266-4.= x-HBase-1.3.02.patch, PHOENIX-5266.01.patch, PHOENIX-5266.patch, PHOENIX-52= 66.patch > > > With Phoenix 4.14.1 client, There is a scenario where client would skip d= ata table write but do successful index table write. In this case, we shoul= d treat it as Data loss scenario. > =C2=A0 > Relevant code path :- > [https://github.com/apache/phoenix/blob/4.x-HBase-1.3/phoenix-core/src/ma= in/java/org/apache/phoenix/execute/MutationState.java#L994-L1043] > [https://github.com/apache/phoenix/blob/4.x-HBase-1.3/phoenix-core/src/ma= in/java/org/apache/phoenix/execute/MutationState.java#L1089-L1109] > =C2=A0 > Here is what happens :- > * Consider below assumptions for scenario :-=C2=A0 > ** max no row in single batch=C2=A0=3D 100 > ** max size of batch =3D 2 MB > * When client faces SQLException Code 1121, it sets variable shouldRetry= IndexedMutation=3Dtrue. > * In scenarios where client sends batch of 100 rows only as per configur= ation, but batch size is >2 MB, MutationState.java#991=C2=A0will split this= 100 row batch into multiple smaller batches which are <2MB. > ** MutationState.java#991 :-=C2=A0[https://github.com/apache/phoenix/blo= b/4.x-HBase-1.3/phoenix-core/src/main/java/org/apache/phoenix/execute/Mutat= ionState.java#L991] > * Suppose there are 5 batches of 20 rows but client faces 1121 SQLExcept= ionCode on 2nd batch , then it will set shouldRetryIndexedMutation=3Dtrue a= nd it will retry all 5 batches again with only Index updates. This will res= ults in rows missing from Data table. -- This message was sent by Atlassian JIRA (v7.6.3#76005)