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

Geoffrey Jacoby commented on PHOENIX-5138:
------------------------------------------

[~tdsilva] - if a Phoenix instance is new, PHOENIX-5132 will work great. Same 
for _most_ scenarios on existing clusters. But consider the following scenario:

1. A customer running 4.14 or 5.0 creates a tenant view index. It creates a new 
sequence whose name follows the *old* convention, and gets a view index id of 
MIN_VALUE
2. Customer upgrades to a version with PHOENIX-5132
3. Customer creates a second tenant-view index using the same tenant as in step 
1. It creates a new sequence whose name follows the *new* convention, and gets 
a view index id of MIN_VALUE. 

The two indexes would then have the same view index id and the same tenant id, 
and hence potentially confuse query results. 


> ViewIndexId sequences created after PHOENIX-5132 shouldn't collide with ones 
> created before it
> ----------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5138
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5138
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.15.0
>            Reporter: Geoffrey Jacoby
>            Assignee: Geoffrey Jacoby
>            Priority: Major
>
> PHOENIX-5132 changed the ViewIndexId generation logic to use one sequence per 
> physical view index table, whereas before it had been tenant + physical 
> table. This removed the possibility of a tenant view index and a global view 
> index having colliding ViewIndexIds.
> However, existing Phoenix environments may have already created tenant-owned 
> view index ids using the old sequence, and under PHOENIX-5132 if they create 
> another, its ViewIndexId will got back to MIN_VALUE, which could cause a 
> collision with an existing view index id. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to