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 C0CE9200BF1 for ; Mon, 19 Dec 2016 08:17:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BF9C0160B18; Mon, 19 Dec 2016 07:17:01 +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 1C490160B21 for ; Mon, 19 Dec 2016 08:17:00 +0100 (CET) Received: (qmail 29887 invoked by uid 500); 19 Dec 2016 07:17:00 -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 29594 invoked by uid 99); 19 Dec 2016 07:17:00 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Dec 2016 07:17:00 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 16CD42C03E2 for ; Mon, 19 Dec 2016 07:17:00 +0000 (UTC) Date: Mon, 19 Dec 2016 07:17:00 +0000 (UTC) From: "Wei Zheng (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-15376) Improve heartbeater scheduling for transactions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Dec 2016 07:17:01 -0000 [ https://issues.apache.org/jira/browse/HIVE-15376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15760406#comment-15760406 ] Wei Zheng commented on HIVE-15376: ---------------------------------- Yes, the call from DbTxnManagrer.acquireLocks() always uses 0 for the delay param, which is not impacted by the change. Regarding testing heartbeat for R/O queries, I added a test case to testLockTimeout to show there's actually heartbeat being sent, otherwise the locks will be expired. Please see patch 10. > Improve heartbeater scheduling for transactions > ----------------------------------------------- > > Key: HIVE-15376 > URL: https://issues.apache.org/jira/browse/HIVE-15376 > Project: Hive > Issue Type: Bug > Components: Transactions > Affects Versions: 2.2.0 > Reporter: Wei Zheng > Assignee: Wei Zheng > Attachments: HIVE-15376.1.patch, HIVE-15376.2.patch, HIVE-15376.3.patch, HIVE-15376.4.patch, HIVE-15376.5.patch, HIVE-15376.6.patch, HIVE-15376.7.patch, HIVE-15376.8.patch, HIVE-15376.9.patch > > > HIVE-12366 improved the heartbeater logic by bringing down the gap between the lock acquisition and first heartbeat, but that's not enough, there may still be some issue, e.g. > Time A: a transaction is opened > Time B: acquireLocks is called (blocking call), but it can take a long time to actually acquire the locks and return if the system is busy > Time C: as acquireLocks returns, the first heartbeat is sent > If hive.txn.timeout < C - A, then the transaction will be timed out and aborted, thus causing failure. -- This message was sent by Atlassian JIRA (v6.3.4#6332)