From dev-return-52669-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Mon Jun 25 16:40:23 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 01425180627 for ; Mon, 25 Jun 2018 16:40:22 +0200 (CEST) Received: (qmail 65379 invoked by uid 500); 25 Jun 2018 14:40: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 65363 invoked by uid 99); 25 Jun 2018 14:40:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2018 14:40:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1BC1EE09EE; Mon, 25 Jun 2018 14:40:21 +0000 (UTC) From: gjacoby126 To: dev@phoenix.apache.org Reply-To: dev@phoenix.apache.org References: In-Reply-To: Subject: [GitHub] phoenix pull request #303: PHOENIX-3534 Support multi region SYSTEM.CATALOG ... Content-Type: text/plain Message-Id: <20180625144021.1BC1EE09EE@git1-us-west.apache.org> Date: Mon, 25 Jun 2018 14:40:21 +0000 (UTC) Github user gjacoby126 commented on a diff in the pull request: https://github.com/apache/phoenix/pull/303#discussion_r197821955 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/replication/SystemCatalogWALEntryFilter.java --- @@ -35,20 +35,18 @@ * during cluster upgrades. However, tenant-owned data such as tenant-owned views need to * be copied. This WALEntryFilter will only allow tenant-owned rows in SYSTEM.CATALOG to * be replicated. Data from all other tables is automatically passed. It will also copy - * child links in SYSTEM.CATALOG that are globally-owned but point to tenant-owned views. + * child links in SYSTEM.CHILD_LINK that are globally-owned but point to tenant-owned views. * */ public class SystemCatalogWALEntryFilter implements WALEntryFilter { - private static byte[] CHILD_TABLE_BYTES = - new byte[]{PTable.LinkType.CHILD_TABLE.getSerializedValue()}; - @Override public WAL.Entry filter(WAL.Entry entry) { - //if the WAL.Entry's table isn't System.Catalog, it auto-passes this filter + //if the WAL.Entry's table isn't System.Catalog or System.Child_Link, it auto-passes this filter //TODO: when Phoenix drops support for pre-1.3 versions of HBase, redo as a WALCellFilter - if (!SchemaUtil.isMetaTable(entry.getKey().getTablename().getName())){ + byte[] tableName = entry.getKey().getTablename().getName(); + if (!SchemaUtil.isMetaTable(tableName) && !SchemaUtil.isChildLinkTable(tableName)){ --- End diff -- Would it be safe to turn on normal HBase replication on the new System.CHILD_LINK? (That is, is there any unwanted data in System.CHILD_LINK that this WALFilter wouldn't copy that normal HBase replication would?) If normal HBase replication works for System.CHILD_LINK, and all view data left in System.Catalog starts with tenant_id, then the logic here can be greatly simplified, similar to how it was before PHOENIX-4229 ---