From issues-return-107864-archive-asf-public=cust-asf.ponee.io@hive.apache.org Tue Mar 6 18:25:04 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 ABDA7180652 for ; Tue, 6 Mar 2018 18:25:03 +0100 (CET) Received: (qmail 99280 invoked by uid 500); 6 Mar 2018 17:25:02 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 99271 invoked by uid 99); 6 Mar 2018 17:25:02 -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, 06 Mar 2018 17:25:02 +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 4139B18030B for ; Tue, 6 Mar 2018 17:25:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 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, T_RP_MATCHES_RCVD=-0.01, 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 UUeocVEdMKEv for ; Tue, 6 Mar 2018 17:25: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 2700E5F3F0 for ; Tue, 6 Mar 2018 17:25: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 A04ECE024F for ; Tue, 6 Mar 2018 17:25: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 3392521276 for ; Tue, 6 Mar 2018 17:25:00 +0000 (UTC) Date: Tue, 6 Mar 2018 17:25:00 +0000 (UTC) From: "Sankar Hariappan (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-18864) ValidWriteIdList snapshot seems incorrect if obtained after allocating writeId by current transaction. 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/HIVE-18864?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Sankar Hariappan updated HIVE-18864: ------------------------------------ Attachment: HIVE-18864.01.patch > ValidWriteIdList snapshot seems incorrect if obtained after allocating wr= iteId by current transaction. > -------------------------------------------------------------------------= ----------------------------- > > Key: HIVE-18864 > URL: https://issues.apache.org/jira/browse/HIVE-18864 > Project: Hive > Issue Type: Sub-task > Components: Transactions > Affects Versions: 3.0.0 > Reporter: Sankar Hariappan > Assignee: Sankar Hariappan > Priority: Major > Labels: ACID > Fix For: 3.0.0 > > Attachments: HIVE-18864.01.patch > > > For multi-statement txns, it is possible that write on a table happens af= ter a read. Let's see the below scenario. > # Committed txn=3D9 writes on table T1 with writeId=3D5. > # Open=C2=A0txn=3D10.=C2=A0ValidTxnList(open:null, txn_HWM=3D10), > # Read table T1 from txn=3D10. ValidWriteIdList(open:null, write_HWM=3D5= ). > # Open txn=3D11, writes on table T1 with writeid=3D6. > # Read table T1 from txn=3D10. ValidWriteIdList(open:null, write_HWM=3D5= ). > # Write table T1 from txn=3D10 with writeId=3D7. > # Read table T1 from txn=3D10. {color:#d04437}*ValidWriteIdList(open:nul= l, write_HWM=3D7)*. =E2=80=93 This read will able to see rows added by txn= =3D11 which is still open.{color} > {color:#d04437}So, it is needed to rebuild the open/aborted list of Valid= WriteIdList based on txn_HWM. Any writeId allocated by txnId >=C2=A0txn_HWM= should be marked as open. In this example,=C2=A0*ValidWriteIdList(open:6, = write_HWM=3D7)* should be generated.{color} > {color:#333333}cc{color} [~ekoifman], [~thejas] -- This message was sent by Atlassian JIRA (v7.6.3#76005)