From dev-return-50271-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Mar 20 05:42:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 77E2318067E for ; Tue, 20 Mar 2018 05:42:06 +0100 (CET) Received: (qmail 73290 invoked by uid 500); 20 Mar 2018 04:42:05 -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 73275 invoked by uid 99); 20 Mar 2018 04:42:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2018 04:42:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B72E4C00DB for ; Tue, 20 Mar 2018 04:42:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 5XKgujD-Qnbo for ; Tue, 20 Mar 2018 04:42:03 +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 C84B35F47B for ; Tue, 20 Mar 2018 04:42: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 56C07E0D7B for ; Tue, 20 Mar 2018 04:42: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 9F443214C1 for ; Tue, 20 Mar 2018 04:42:00 +0000 (UTC) Date: Tue, 20 Mar 2018 04:42:00 +0000 (UTC) From: "Ankit Singhal (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (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 [ https://issues.apache.org/jira/browse/PHOENIX-4010?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ankit Singhal closed PHOENIX-4010. ---------------------------------- > 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 > Priority: Major > Fix For: 4.12.0 > > Attachments: PHOENIX-4010.addendum.patch, PHOENIX-4010.patch, PHO= ENIX-4010_v1.patch, PHOENIX-4010_v2.patch, PHOENIX-4010_v2_rebased.patch, P= HOENIX-4010_v2_rebased_1.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 (v7.6.3#76005)