Jacob Isaac created PHOENIX-5606:
------------------------------------
Summary: Upgrade from 4.14 -> 4.15 fails
Key: PHOENIX-5606
URL: https://issues.apache.org/jira/browse/PHOENIX-5606
Project: Phoenix
Issue Type: Bug
Affects Versions: 4.15.0
Reporter: Jacob Isaac
Disable ns mapping and set autoUpgrade to true initially
1. Connect to a 4.14 server with a 4.14 client
--> This will create SYSTEM.CATALOG with the 4.14 timestamp
2. Upgrade server jar to 4.15
3. Connect with a 4.15 client for the first time with autoUpgrade disabled (or
doNotUpgrade property set)
--> This should fail to upgrade SYSTEM.CATALOG and should throw an
UpgradeRequiredException
4. Now, sqlline should show the UpgradeRequiredException, but not kill the
connection, then run EXECUTE UPGRADE
Fails with the following exception :-
0: jdbc:phoenix:localhost> EXECUTE UPGRADE;
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
at
org.apache.phoenix.schema.PTableImpl.getColumnForColumnName(PTableImpl.java:1106)
at
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.resolveColumn(FromCompiler.java:528)
at
org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:483)
at
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:797)
at
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:783)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:404)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:394)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:393)
at
org.apache.phoenix.jdbc.PhoenixStatement.access$700(PhoenixStatement.java:215)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:434)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:394)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:393)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:381)
at
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:173)
at
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:183)
at
org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2908)
at
org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1064)
at
org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:217)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:411)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:394)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:393)
at
org.apache.phoenix.jdbc.PhoenixStatement.access$700(PhoenixStatement.java:215)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:434)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:394)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:393)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:381)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1824)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemChildLink(ConnectionQueryServicesImpl.java:3732)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeOtherSystemTablesIfRequired(ConnectionQueryServicesImpl.java:3719)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.upgradeSystemTables(ConnectionQueryServicesImpl.java:3648)
at
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExecuteUpgradeStatement$1.execute(PhoenixStatement.java:1403)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:411)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:394)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:393)
at
org.apache.phoenix.jdbc.PhoenixStatement.access$700(PhoenixStatement.java:215)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:434)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:394)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:393)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:381)
at
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1843)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:807)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
0: jdbc:phoenix:localhost> !quit
Closing: org.apache.phoenix.jdbc.PhoenixConnection
--
This message was sent by Atlassian Jira
(v8.3.4#803005)