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 01543200CC5 for ; Tue, 11 Jul 2017 19:13:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F3F081667C2; Tue, 11 Jul 2017 17:13: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 467511667BB for ; Tue, 11 Jul 2017 19:13:45 +0200 (CEST) Received: (qmail 50857 invoked by uid 500); 11 Jul 2017 17:13:44 -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 50833 invoked by uid 99); 11 Jul 2017 17:13:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2017 17:13:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E6407196062 for ; Tue, 11 Jul 2017 17:13:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 9e3UD7rIxfwy for ; Tue, 11 Jul 2017 17:13:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A80E8624C9 for ; Tue, 11 Jul 2017 17:07:02 +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 9FB6EE0DA6 for ; Tue, 11 Jul 2017 17:07:01 +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 42F97246BD for ; Tue, 11 Jul 2017 17:07:00 +0000 (UTC) Date: Tue, 11 Jul 2017 17:07:00 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4010) Hash Join cache may not be send to all regionservers when we have stale HBase meta cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 11 Jul 2017 17:13:46 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-4010?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 082525#comment-16082525 ]=20 James Taylor commented on PHOENIX-4010: --------------------------------------- Since presumably this is relatively rare, we could retry the entire query f= rom PhoenixStatement in the case of a HashCacheNotFoundException. We do tha= t already for other classes of exceptions such as MetaDataEntityNotFoundExc= eption. > Hash Join cache may not be send to all regionservers when we have stale H= Base meta cache > -------------------------------------------------------------------------= --------------- > > Key: PHOENIX-4010 > URL: https://issues.apache.org/jira/browse/PHOENIX-4010 > Project: Phoenix > Issue Type: Bug > Reporter: Ankit Singhal > Assignee: Ankit Singhal > Fix For: 4.12.0 > > Attachments: PHOENIX-4010.patch > > > If the region locations changed and our HBase meta cache is not updated = then we might not be sending hash join cache to all region servers hosting = the regions. > ConnectionQueryServicesImpl#getAllTableRegions > {code} > boolean reload =3Dfalse; > while (true) { > try { > // We could surface the package projected HConnectionImpl= ementation.getNumberOfCachedRegionLocations > // to get the sizing info we need, but this would require= a new class in the same package and a cast > // to this implementation class, so it's probably not wor= th it. > List locations =3D Lists.newArrayList(); > byte[] currentKey =3D HConstants.EMPTY_START_ROW; > do { > HRegionLocation regionLocation =3D connection.getRegi= onLocation( > TableName.valueOf(tableName), currentKey, rel= oad); > locations.add(regionLocation); > currentKey =3D regionLocation.getRegionInfo().getEndK= ey(); > } while (!Bytes.equals(currentKey, HConstants.EMPTY_END_R= OW)); > return locations; > {code} > Skipping duplicate servers in ServerCacheClient#addServerCache > {code} > List locations =3D services.getAllTableRegions(cacheUsin= gTable.getPhysicalName().getBytes()); > int nRegions =3D locations.size(); > =20 > ..... > if ( ! servers.contains(entry) &&=20 > keyRanges.intersectRegion(regionStartKey, regionE= ndKey, > cacheUsingTable.getIndexType() =3D=3D Ind= exType.LOCAL)) { =20 > // Call RPC once per server > servers.add(entry); > {code} > For eg:- Table =E2=80=99T=E2=80=99 has two regions R1 and R2 originally h= osted on regionserver RS1.=20 > while Phoenix/Hbase connection is still active, R2 is transitioned to RS2= , but stale meta cache will still give old region locations i.e R1 and R2= on RS1 and when we start copying hash table, we copy for R1 and skip R2 as= they are hosted on same regionserver. so, the query on a table will fail a= s it will unable to find hash table cache on RS2 for processing regions R2. -- This message was sent by Atlassian JIRA (v6.4.14#64029)