phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas D'Silva (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-5138) ViewIndexId sequences created after PHOENIX-5132 shouldn't collide with ones created before it
Date Thu, 14 Feb 2019 02:31:00 GMT

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

Thomas D'Silva commented on PHOENIX-5138:
-----------------------------------------

If the a tenant view index is created won't it use the same sequence as that of the global
view indexes and so it should be fine right?

On a related note, it looks like the  getViewIndexSequenceName only used the physical name
while creating the view index sequence for namespace mapped tables. This doesn't seem right
to me.

{code}
    public static String getViewIndexSequenceName(PName physicalName, PName tenantId, boolean
isNamespaceMapped) {
        if (!isNamespaceMapped) { return VIEW_INDEX_SEQUENCE_NAME_PREFIX + (tenantId == null
? "" : tenantId); }
        return SchemaUtil.getTableNameFromFullName(physicalName.toString()) + VIEW_INDEX_SEQUENCE_NAME_PREFIX;
    }
{code}

> 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)

Mime
View raw message