[
https://issues.apache.org/jira/browse/PHOENIX-4229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16199755#comment-16199755
]
Geoffrey Jacoby commented on PHOENIX-4229:
------------------------------------------
[~jamestaylor] - SystemCatalogWALEntryFilter's job is to allow replication of
System.Catalog to be safely turned on. It keeps all edits to System.Catalog
from being replicated *except* those involving tenant views. Table creation
doesn't get replicated; global view creation doesn't get replicated. Tenant
view creation does.
Before PHOENIX-2051, this was easy. If you just looked at the tenant_id of the
row key of every edit to System.Catalog, you could filter out those with a
tenant_id of null, and let replicate those with a tenant_id of anything else.
PHOENIX-2051 introduced parent-child links as an extra row of metadata
associated with a tenant-view _but not necessarily owned by the view's tenant_.
This broke SystemCatalogWALEntryFilter's logic, because that parent-child link
would be mistakenly filtered out when it should be replicated, in the case of a
tenant view on a table or global view.
This JIRA expands the SystemCatalogWALEntryFilter's criteria to also replicate
parent-child links pointing to tenant-owned views.
> Parent-Child linking rows in System.Catalog break tenant view replication
> -------------------------------------------------------------------------
>
> Key: PHOENIX-4229
> URL: https://issues.apache.org/jira/browse/PHOENIX-4229
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.11.0, 4.12.0
> Reporter: Geoffrey Jacoby
> Assignee: Geoffrey Jacoby
> Fix For: 4.13.0
>
> Attachments: PHOENIX-4229-v2.patch, PHOENIX-4229.patch
>
>
> PHOENIX-2051 introduced new Parent-Child linking rows to System.Catalog that
> speed up view deletion. Unfortunately, this breaks assumptions in
> PHOENIX-3639, which gives a way to replicate tenant views from one cluster to
> another. (It assumes that all the metadata for a tenant view is owned by the
> tenant -- the linking rows are not.)
> PHOENIX-3639 was a workaround in the first place to the more fundamental
> design problem that Phoenix places the metadata for both table schemas --
> which should never be replicated -- in the same table and column family as
> the metadata for tenant views, which should be replicated.
> Note that the linking rows also make it more difficult to ever split these
> two datasets apart, as proposed in PHOENIX-3520.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)