Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C961D1064A for ; Thu, 19 Mar 2015 05:24:15 +0000 (UTC) Received: (qmail 77914 invoked by uid 500); 19 Mar 2015 05:23:59 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 77864 invoked by uid 500); 19 Mar 2015 05:23:59 -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 77853 invoked by uid 99); 19 Mar 2015 05:23:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2015 05:23:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 19 Mar 2015 05:23:58 +0000 Received: (qmail 76997 invoked by uid 99); 19 Mar 2015 05:23:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2015 05:23:38 +0000 Date: Thu, 19 Mar 2015 05:23:38 +0000 (UTC) From: "Lars Hofhansl (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-1751) Perform aggregations, sorting, etc, in the preScannerNext instead of postScannerOpen MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PHOENIX-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14368534#comment-14368534 ] Lars Hofhansl commented on PHOENIX-1751: ---------------------------------------- And even than, that would break coprocessor chaining, if the Phoenix one is not last one in the chain (the RegionObserver itself cannot have any state, so the state needs to be in the RegionScanner, but a later coprocessor in the chain might return another instance that wraps or replaces the passed one). > Perform aggregations, sorting, etc, in the preScannerNext instead of postScannerOpen > ------------------------------------------------------------------------------------ > > Key: PHOENIX-1751 > URL: https://issues.apache.org/jira/browse/PHOENIX-1751 > Project: Phoenix > Issue Type: Bug > Reporter: Lars Hofhansl > > 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)