From issues-return-168965-archive-asf-public=cust-asf.ponee.io@hive.apache.org Thu Oct 10 16:11: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 1E97E180626 for ; Thu, 10 Oct 2019 18:11:03 +0200 (CEST) Received: (qmail 56434 invoked by uid 500); 10 Oct 2019 16:11: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 56423 invoked by uid 99); 10 Oct 2019 16:11: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; Thu, 10 Oct 2019 16:11:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D3728E30CD for ; Thu, 10 Oct 2019 16:11:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 34F08780895 for ; Thu, 10 Oct 2019 16:11:00 +0000 (UTC) Date: Thu, 10 Oct 2019 16:11:00 +0000 (UTC) From: "Denys Kuzmenko (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-21114) Create read-only transactions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-21114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Denys Kuzmenko updated HIVE-21114: ---------------------------------- Attachment: (was: HIVE-21114.1.patch) > Create read-only transactions > ----------------------------- > > Key: HIVE-21114 > URL: https://issues.apache.org/jira/browse/HIVE-21114 > Project: Hive > Issue Type: Bug > Components: Transactions > Affects Versions: 4.0.0 > Reporter: Eugene Koifman > Assignee: Denys Kuzmenko > Priority: Major > > With HIVE-21036 we have a way to indicate that a txn is read only. > We should (at least in auto-commit mode) determine if the single stmt is a read and mark the txn accordingly. > Then we can optimize {{TxnHandler.commitTxn()}} so that it doesn't do any checks in write_set etc. > {{TxnHandler.commitTxn()}} already starts with {{lockTransactionRecord(stmt, txnid, TXN_OPEN)}} so it can read the txn type in the same SQL stmt. > HiveOperation only has QUERY, which includes Insert and Select, so this requires figuring out how to determine if a query is a SELECT. By the time {{Driver.openTransaction();}} is called, we have already parsed the query so there should be a way to know if the statement only reads. > For multi-stmt txns (once these are supported) we should allow user to indicate that a txn is read-only and then not allow any statements that can make modifications in this txn. This should be a different jira. > cc [~ikryvenko] -- This message was sent by Atlassian Jira (v8.3.4#803005)