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 B05A6200C5A for ; Tue, 4 Apr 2017 05:47:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AECCD160B9C; Tue, 4 Apr 2017 03:47:45 +0000 (UTC) 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 00FB8160B8F for ; Tue, 4 Apr 2017 05:47:44 +0200 (CEST) Received: (qmail 11354 invoked by uid 500); 4 Apr 2017 03:47:44 -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 11345 invoked by uid 99); 4 Apr 2017 03:47:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2017 03:47:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6AA74C04BF for ; Tue, 4 Apr 2017 03:47:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id pTSzCMssyUJx for ; Tue, 4 Apr 2017 03:47:42 +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 A5D275F23A for ; Tue, 4 Apr 2017 03:47:42 +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 167FCE0629 for ; Tue, 4 Apr 2017 03:47:42 +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 8F19E2401A for ; Tue, 4 Apr 2017 03:47:41 +0000 (UTC) Date: Tue, 4 Apr 2017 03:47:41 +0000 (UTC) From: "Eugene Koifman (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-12636) Ensure that all queries (with DbTxnManager) run in a transaction MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 04 Apr 2017 03:47:45 -0000 [ https://issues.apache.org/jira/browse/HIVE-12636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eugene Koifman updated HIVE-12636: ---------------------------------- Attachment: HIVE-12636.03.patch > Ensure that all queries (with DbTxnManager) run in a transaction > ---------------------------------------------------------------- > > Key: HIVE-12636 > URL: https://issues.apache.org/jira/browse/HIVE-12636 > Project: Hive > Issue Type: Improvement > Components: Transactions > Affects Versions: 1.0.0 > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Priority: Critical > Attachments: HIVE-12636.01.patch, HIVE-12636.02.patch, HIVE-12636.03.patch > > > Assuming Hive is using DbTxnManager > Currently (as of this writing only auto commit mode is supported), only queries that write to an Acid table start a transaction. > Read-only queries don't open a txn but still acquire locks. > This makes internal structures confusing/odd. > The are constantly 2 code paths to deal with which is inconvenient and error prone. > Also, a txn id is convenient "handle" for all locks/resources within a txn. > Doing thing would mean the client no longer needs to track locks that it acquired. This enables further improvements to metastore side of Acid. > # add metastore call to openTxn() and acquireLocks() in a single call. this it to make sure perf doesn't degrade for read-only query. (Would also be useful for auto commit write queries) > # Should RO queries generate txn ids from the same sequence? (they could for example use negative values of a different sequence). Txnid is part of the delta/base file name. Currently it's 7 digits. If we use the same sequence, we'll exceed 7 digits faster. (possible upgrade issue). On the other hand there is value in being able to pick txn id and commit timestamp out of the same logical sequence. -- This message was sent by Atlassian JIRA (v6.3.15#6346)