[
https://issues.apache.org/jira/browse/PHOENIX-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994002#comment-16994002
]
Geoffrey Jacoby commented on PHOENIX-5610:
------------------------------------------
[~larsh] - before I file a separate JIRA, can you please check to see if your
fix also fixes the following case? 4.14 client / 4.15 server.
{code:java}
CREATE TABLE IF NOT EXISTS TEST.BASE_TABLE_2 (id char(15) primary key, val1
integer);
CREATE VIEW IF NOT EXISTS TEST.BASE_TABLE_VIEW_2 (id_view char(15) primary key,
child_val integer, child_val2 integer) AS SELECT * from TEST.BASE_TABLE_2 where
id = 'foo';
ALTER VIEW TEST.BASE_TABLE_VIEW_2 DROP COLUMN IF EXISTS child_val;
{code}
I get an error similar to 5610's:
{code:java}
Error: java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for
length 4 (state=,code=0)
java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException: Index 4 out of
bounds for length 4
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1466)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1428)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.dropColumn(ConnectionQueryServicesImpl.java:2412)
at
org.apache.phoenix.schema.MetaDataClient.dropColumn(MetaDataClient.java:3795)
at
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableDropColumnStatement$1.execute(PhoenixStatement.java:1461)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:410)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:393)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:392)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:380)
at
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1829)
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)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for
length 4
at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:517)
at
org.apache.phoenix.schema.PTableImpl.createFromProto(PTableImpl.java:1358)
at
org.apache.phoenix.coprocessor.MetaDataProtocol$MetaDataMutationResult.constructFromProto(MetaDataProtocol.java:355)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1458)
... 16 more
{code}
> 4.14 client dropped table but raised ArrayIndexOutOfBoundsException on 4.15
> server
> -----------------------------------------------------------------------------------
>
> Key: PHOENIX-5610
> URL: https://issues.apache.org/jira/browse/PHOENIX-5610
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.15.0
> Reporter: Xinyi Yan
> Priority: Blocker
> Fix For: 4.15.0
>
> Attachments: 5610-4.x-HBase-1.5.txt, Screen Shot 2019-12-10 at
> 5.15.35 PM.png, Screen Shot 2019-12-10 at 5.24.05 PM.png
>
>
> I created a multi-tenant table and a global view on the 4.15 server
> (hbase1.3.3) from a 4.15 client and then tried to drop the global view from
> the 4.14 client. The 4.14 client raised ArrayIndexOutOfBoundsException, even
> though it dropped the global view. I uploaded two screenshots for 4.15 and
> 4.14 clients along with reproducing steps.
>
> Command to reproduce :
> 4.15 client:
> CREATE TABLE A (TENANT_ID VARCHAR(15) NOT NULL, A BIGINT NOT NULL, B BIGINT
> CONSTRAINT PK PRIMARY KEY (TENANT_ID, A)) MULTI_TENANT=true;
> CREATE VIEW B(C BIGINT) AS SELECT * FROM A;
> 4.14 client:
> DROP VIEW B;
>
> !Screen Shot 2019-12-10 at 5.15.35 PM.png|width=600, height=300!
>
> !Screen Shot 2019-12-10 at 5.24.05 PM.png|width=600, height=300!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)