Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 493F0200AED for ; Tue, 3 May 2016 20:06:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 486041609F7; Tue, 3 May 2016 20:06:14 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BD2331609A9 for ; Tue, 3 May 2016 20:06:13 +0200 (CEST) Received: (qmail 18080 invoked by uid 500); 3 May 2016 18:06:13 -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 18052 invoked by uid 99); 3 May 2016 18:06:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 18:06:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D4CEF2C14F4 for ; Tue, 3 May 2016 18:06:12 +0000 (UTC) Date: Tue, 3 May 2016 18:06:12 +0000 (UTC) From: "Wei Zheng (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-11848) tables in subqueries don't get locked MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 May 2016 18:06:14 -0000 [ https://issues.apache.org/jira/browse/HIVE-11848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15269229#comment-15269229 ] Wei Zheng commented on HIVE-11848: ---------------------------------- patch looks good. +1 > tables in subqueries don't get locked > ------------------------------------- > > Key: HIVE-11848 > URL: https://issues.apache.org/jira/browse/HIVE-11848 > Project: Hive > Issue Type: Bug > Components: Locking, Transactions > Affects Versions: 1.0.0 > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Priority: Critical > Attachments: HIVE-11848.patch > > > Consider > {noformat} > update acidTbl set b=19 where acidTbl.b in(select I.b from nonAcidOrcTbl I where I.a = 3) > {noformat} > noAcidOrcTbl doesn't get locked at all. (SHARED_WRITE is taken on acidTbl). > Same for __delete__ with subquery > This is is because the ReadEntity for nonAcidOrcTbl is skipped by > {noformat} > for (ReadEntity input : plan.getInputs()) { > if (!input.needsLock() || input.isUpdateOrDelete()) { > // We don't want to acquire readlocks during update or delete as we'll be acquiring write > // locks instead. > continue; > } > {noformat} > whatever sets isUpdateOrDelete() flag doesn't pay attention to whether the table is written to or not. > HIVE-10150 was a similar issue, abstractly -- This message was sent by Atlassian JIRA (v6.3.4#6332)