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 8CE19200D3E for ; Thu, 2 Nov 2017 06:48:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8B6D4160BFA; Thu, 2 Nov 2017 05:48:09 +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 D1B73160BEA for ; Thu, 2 Nov 2017 06:48:08 +0100 (CET) Received: (qmail 42060 invoked by uid 500); 2 Nov 2017 05:48:07 -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 42049 invoked by uid 99); 2 Nov 2017 05:48:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2017 05:48:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B19981A45F8 for ; Thu, 2 Nov 2017 05:48:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id jQr1AEik1SeL for ; Thu, 2 Nov 2017 05:48:06 +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 A84E76114D for ; Thu, 2 Nov 2017 05:48:05 +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 C1522E06C7 for ; Thu, 2 Nov 2017 05:48:04 +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 D5ABA2441C for ; Thu, 2 Nov 2017 05:48:01 +0000 (UTC) Date: Thu, 2 Nov 2017 05:48:01 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4333) Stats - Incorrect estimate when stats are updated on a tenant specific view MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Nov 2017 05:48:09 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-4333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16235217#comment-16235217 ] James Taylor commented on PHOENIX-4333: --------------------------------------- The concept is good, but how about outside of the loop if you just have this check: {code} } catch (EOFException e) { // We have read all guide posts intersectWithGuidePosts = false; } } + gpsAvailableForAllRegions &= initialKeyBytes != currentKeyBytes; if (!useStatsForParallelization) { {code} I also think we should set the estimatedRows and estimatedSize to what we've found, but only set estimateInfoTimestamp to null if !gpsAvailableForAllRegions. That way callers can choose to use or not use the partial estimates based on estimateInfoTimestamp. {code} this.estimatedRows = estimates.rowsEstimate; this.estimatedSize = estimates.bytesEstimate; this.estimateInfoTimestamp = gpsAvailableForAllRegions ? estimateTs : null; {code} > Stats - Incorrect estimate when stats are updated on a tenant specific view > --------------------------------------------------------------------------- > > Key: PHOENIX-4333 > URL: https://issues.apache.org/jira/browse/PHOENIX-4333 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.12.0 > Reporter: Mujtaba Chohan > Assignee: Samarth Jain > Priority: Major > Attachments: PHOENIX-4333_test.patch, PHOENIX-4333_v1.patch > > > Consider two tenants A, B with tenant specific view on 2 separate regions/region servers. > {noformat} > Region 1 keys: > A,1 > A,2 > B,1 > Region 2 keys: > B,2 > B,3 > {noformat} > When stats are updated on tenant A view. Querying stats on tenant B view yield partial results (only contains stats for B,1) which are incorrect even though it shows updated timestamp as current. -- This message was sent by Atlassian JIRA (v6.4.14#64029)