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

James Taylor commented on PHOENIX-954:
--------------------------------------

Good find, [~rajesh23]. I'll pull this in. Doesn't the same logic need to be 
applied for a local index table as well? Currently we're only looking to see if 
the table is marked as a VIEW INDEX table, but I think we likely need to have 
an additional check. Basically the local index table should have the same life 
cycle as the view index table.

> View index sequences of a non multi tenant table are not getting deleted 
> after main table drop
> ----------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-954
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-954
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>            Priority: Minor
>             Fix For: 5.0.0, 3.1, 4.1
>
>         Attachments: PHOENIX-954.patch
>
>
> Lets suppose we have created view indices for a table and drop it then view 
> index sequences are not getting deleted.
> When we drop main table corresponding view index table will be deleted. So 
> {code}
> MetaDataUtil.hasViewIndexTable(connection, table.getPhysicalName()){code}
>  always return false and 
> {code}MetaDataUtil.deleteViewIndexSequences(connection, 
> table.getPhysicalName()){code} never be called.
> {code}
>                         if (tableType == PTableType.TABLE && 
> (table.isMultiTenant() || MetaDataUtil.hasViewIndexTable(connection, 
> table.getPhysicalName()))) {
>                             MetaDataUtil.deleteViewIndexSequences(connection, 
> table.getPhysicalName());
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to