[
https://issues.apache.org/jira/browse/PHOENIX-5103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16878877#comment-16878877
]
Chinmay Kulkarni commented on PHOENIX-5103:
-------------------------------------------
We can solve the issue for the first-time client having version < 4.15 by
checking the client version before calling `dropChildViews`. There is however,
a bigger issue in the 4.15 SysCat upgrade path.
When a 4.15 client connects later on (when the SYSTEM.CATALOG timestamp is <
4.15), this will trigger the SysCat upgrade path. Wherever we add columns to
SysCat, we eventually call MetaDataEndpointImpl#findAllChildViews which depends
on the existence of SYSTEM.CHILD_LINK. Since the first client to connect to the
4.15 server was < 4.15, the CHILD_LINK table would not have been created at
this point.
Thus, we will need SYSTEM.CHILD_LINK to have been created *before* we try to
upgrade SYSTEM.CATALOG. If however, we try to create SYSTEM.CHILD_LINK before
this, that fails because the 4.15 client path expects SysCat to already contain
the VIEW_INDEX_ID_DATA_TYPE:
{noformat}
Error: ERROR 504 (42703): Undefined column.
columnName=SYSTEM.CATALOG.VIEW_INDEX_ID_DATA_TYPE (state=42703,code=504)
org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): Undefined
column. columnName=SYSTEM.CATALOG.VIEW_INDEX_ID_DATA_TYPE
....
{noformat}
The VIEW_INDEX_ID_DATA_TYPE column is added in the SysCat 4.15 upgrade path,
but this is an addColumn call which depends on SYSTEM.CHILD_LINK to exist. This
is a chicken-egg situation. I think we might need to re-introduce the
deprecated `findChildViews_deprecated` method again in order to solve this. Any
suggestions [[email protected]] [~lhofhansl] [~vincentpoon]?
> 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
>
>
> 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
(v7.6.3#76005)