You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Chinmay Kulkarni (Jira)" <ji...@apache.org> on 2019/12/11 19:37:00 UTC

[jira] [Comment Edited] (PHOENIX-5610) 4.14 client dropped table but raised ArrayIndexOutOfBoundsException on 4.15 server

    [ https://issues.apache.org/jira/browse/PHOENIX-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16993847#comment-16993847 ] 

Chinmay Kulkarni edited comment on PHOENIX-5610 at 12/11/19 7:36 PM:
---------------------------------------------------------------------

Did some preliminary debugging and it looks like the MetaDataResponse returned from the 4.15 server for the dropTable call in case of an old client does not return all the columns (including the parent table), the response looks like this:

{code:java}
"" -> "returnCode: TABLE_ALREADY_EXISTS
mutationTime: 1576091789964
table {
  schemaNameBytes: ""
  tableNameBytes: "B"
  tableType: VIEW
  sequenceNumber: 0
  timeStamp: 1576091554435
  bucketNum: -1
  columns {
    columnNameBytes: "C"
    familyNameBytes: "0"
    dataType: "BIGINT"
    nullable: true
    position: 3
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
    columnQualifierBytes: "\200\016"
    16: 1576091554435
    17: 0
  }
  isImmutableRows: false
  dataTableNameBytes: "A"
  disableWAL: false
  multiTenant: true
  viewType: "\003"
  physicalNames: "A"
  storeNulls: false
  baseColumnCount: 3
  rowKeyOrderOptimizable: true
  updateCacheFrequency: 0
  indexDisableTimestamp: 0
  isNamespaceMapped: false
  isAppendOnlySchema: false
  parentNameBytes: "A"
  storageScheme: "\001"
  encodingScheme: "\002"
  40: 0
  41: 0
}
autoPartitionNum: 0
13: 5
"
{code}

Whereas, for a 4.14 server, the response returns all columns (including parent table's columns) and looks like this:

{code:java}
returnCode: TABLE_ALREADY_EXISTS
mutationTime: 1576092446522
table {
  schemaNameBytes: ""
  tableNameBytes: "B"
  tableType: VIEW
  sequenceNumber: 0
  timeStamp: 1576092429040
  bucketNum: -1
  columns {
    columnNameBytes: "TENANT_ID"
    dataType: "VARCHAR"
    maxLength: 15
    nullable: false
    position: 0
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
  }
  columns {
    columnNameBytes: "A"
    dataType: "BIGINT"
    nullable: false
    position: 1
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
  }
  columns {
    columnNameBytes: "B"
    familyNameBytes: "0"
    dataType: "BIGINT"
    nullable: true
    position: 2
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
    columnQualifierBytes: "\200\v"
  }
  columns {
    columnNameBytes: "C"
    familyNameBytes: "0"
    dataType: "BIGINT"
    nullable: true
    position: 3
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
    columnQualifierBytes: "\200\f"
  }
  isImmutableRows: false
  dataTableNameBytes: "A"
  disableWAL: false
  multiTenant: true
  viewType: "\003"
  physicalNames: "A"
  storeNulls: false
  baseColumnCount: 3
  rowKeyOrderOptimizable: true
  updateCacheFrequency: 0
  indexDisableTimestamp: 0
  isNamespaceMapped: false
  isAppendOnlySchema: false
  parentNameBytes: "A"
  storageScheme: "\001"
  encodingScheme: "\002"
}
autoPartitionNum: 0
{code}
 
This would have to do with the change we now have for combining columns from the parent from the new splittable SYSTEM.CATALOG changes. Sigh this looks like a blocker and perhaps there are other such cases lying around waiting to be found.
[~larsh] [~tdsilva] [~gjacoby] [~vincentpoon] [~yanxinyi]



was (Author: ckulkarni):
Did some preliminary debugging and it looks like the MetaDataResponse returned from the 4.15 server for the dropTable call in case of an old client does not return all the columns (including the parent table), the response looks like this:

{code:java}
"" -> "returnCode: TABLE_ALREADY_EXISTS
mutationTime: 1576091789964
table {
  schemaNameBytes: ""
  tableNameBytes: "B"
  tableType: VIEW
  sequenceNumber: 0
  timeStamp: 1576091554435
  bucketNum: -1
  columns {
    columnNameBytes: "C"
    familyNameBytes: "0"
    dataType: "BIGINT"
    nullable: true
    position: 3
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
    columnQualifierBytes: "\200\016"
    16: 1576091554435
    17: 0
  }
  isImmutableRows: false
  dataTableNameBytes: "A"
  disableWAL: false
  multiTenant: true
  viewType: "\003"
  physicalNames: "A"
  storeNulls: false
  baseColumnCount: 3
  rowKeyOrderOptimizable: true
  updateCacheFrequency: 0
  indexDisableTimestamp: 0
  isNamespaceMapped: false
  isAppendOnlySchema: false
  parentNameBytes: "A"
  storageScheme: "\001"
  encodingScheme: "\002"
  40: 0
  41: 0
}
autoPartitionNum: 0
13: 5
"
{code}

Whereas, for a 4.14 server, the response returns all columns and looks like this:

{code:java}
"" -> "returnCode: TABLE_ALREADY_EXISTS
mutationTime: 1576092446522
table {
  schemaNameBytes: ""
  tableNameBytes: "B"
  tableType: VIEW
  sequenceNumber: 0
  timeStamp: 1576092429040
  bucketNum: -1
  columns {
    columnNameBytes: "TENANT_ID"
    dataType: "VARCHAR"
    maxLength: 15
    nullable: false
    position: 0
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
  }
  columns {
    columnNameBytes: "A"
    dataType: "BIGINT"
    nullable: false
    position: 1
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
  }
  columns {
    columnNameBytes: "B"
    familyNameBytes: "0"
    dataType: "BIGINT"
    nullable: true
    position: 2
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
    columnQualifierBytes: "\200\v"
  }
  columns {
    columnNameBytes: "C"
    familyNameBytes: "0"
    dataType: "BIGINT"
    nullable: true
    position: 3
    sortOrder: 2
    viewReferenced: false
    isRowTimestamp: false
    columnQualifierBytes: "\2"
{code}
 
This would have to do with the change we now have for combining columns from the parent from the new splittable SYSTEM.CATALOG changes. Sigh this looks like a blocker and perhaps there are other such cases lying around waiting to be found.
[~larsh] [~tdsilva] [~gjacoby] [~vincentpoon] [~yanxinyi]


> 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: Major
>             Fix For: 4.15.0
>
>         Attachments: 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)