[
https://issues.apache.org/jira/browse/PHOENIX-5103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16959341#comment-16959341
]
Chinmay Kulkarni commented on PHOENIX-5103:
-------------------------------------------
[~tdsilva] [~kozdemir] The main problem is, in the case of older clients, when
we drop cascade a base table, we remove all rows (including LINK_TYPE=4 row
linking it to its child views). Because of this, there is no record of that
table having ever existed.
The idea as per comments is that after dropping table T, we only try to
clean-up its child-view metadata if we try to recreate the same table T. This
works in the case of 4.15.0 clients since the CHILD_LINK table still contains
"orphan" parent->child links (LINK_TYPE=4). BUT, in the case of 4.14 clients,
these rows are also removed as part of the drop table for T. So, even if we
call
[dropChildViews|https://github.com/apache/phoenix/blob/27ef3024cd3cd3bcf521cd932deb66166969f321/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java#L1724],
we end up getting no
[childViews|https://github.com/apache/phoenix/blob/27ef3024cd3cd3bcf521cd932deb66166969f321/phoenix-core/src/main/java/org/apache/phoenix/util/ViewUtil.java#L187].
Not sure what the best way forward is at this point :(
> Can't create/drop table using 4.14 client against 4.15 server
> -------------------------------------------------------------
>
> Key: PHOENIX-5103
> URL: https://issues.apache.org/jira/browse/PHOENIX-5103
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.15.0
> Reporter: Vincent Poon
> Assignee: Chinmay Kulkarni
> Priority: Blocker
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-5103-4.x-HBase-1.3.patch,
> PHOENIX-5103-master.patch
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> server is running 4.15 commit e3280f
> Connect with 4.14.1 client. Create table gives this:
> Caused by:
> org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.TableNotFoundException):
> org.apache.hadoop.hbase.TableNotFoundException: Table 'SYSTEM:CHILD_LINK'
> was not found, got: SYSTEM:CATALOG.
> at
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegionInMeta(ConnectionManager.java:1362)
> at
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1230)
> at
> org.apache.hadoop.hbase.client.CoprocessorHConnection.locateRegion(CoprocessorHConnection.java:41)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)