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 E1D66200B77 for ; Sat, 20 Aug 2016 06:25:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E059E160AAC; Sat, 20 Aug 2016 04:25:22 +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 34B3D160AAB for ; Sat, 20 Aug 2016 06:25:22 +0200 (CEST) Received: (qmail 41662 invoked by uid 500); 20 Aug 2016 04:25:21 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 41634 invoked by uid 99); 20 Aug 2016 04:25:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Aug 2016 04:25:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1C7F82C0050 for ; Sat, 20 Aug 2016 04:25:21 +0000 (UTC) Date: Sat, 20 Aug 2016 04:25:21 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-1751) Perform aggregations, sorting, etc, in the preScannerOpen instead of postScannerOpen MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 20 Aug 2016 04:25:23 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-1751: ---------------------------------- Attachment: PHOENIX-1751_v3.patch New patch that fixes the couple of test failures (which were related to stats being run over multi-tenant tables) > Perform aggregations, sorting, etc, in the preScannerOpen instead of postScannerOpen > ------------------------------------------------------------------------------------ > > Key: PHOENIX-1751 > URL: https://issues.apache.org/jira/browse/PHOENIX-1751 > Project: Phoenix > Issue Type: Bug > Reporter: Lars Hofhansl > Assignee: James Taylor > Attachments: 1751-WIP-v2.txt, 1751-WIP-v2b.patch, 1751-WIP.txt, PHOENIX-1751-v2c.patch, PHOENIX-1751.patch, PHOENIX-1751_v3.patch > > > HBase retains a lease for every scanner. Then lease expires the scan will no longer (be allowed to) work. The leases guard against the client going away, and allow cleaning up resources if that happens. > At various points HBase "suspends" the lease while the region server are working on behalf of this scanner, so that the lease won't expire even though the server is working on it. > HBase does that during the scanning process. Crucially it suspends the leaser after the scanner is opened, before next() is issued on it. > The outcome of all this is that Phoenix executes aggregates, sorts, etc, with the lease in place, and hence if these take a bit the lease can expire even though the server was working on it. > Phoenix should do this work in preScannerNext, being careful that the precalculation is only performed once. > I'll attach a sample patch soon. -- This message was sent by Atlassian JIRA (v6.3.4#6332)