[
https://issues.apache.org/jira/browse/PHOENIX-4434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16282838#comment-16282838
]
Karan Mehta commented on PHOENIX-4434:
--------------------------------------
In particular, 2 cases need to be handled for multi-tenant tables
1. There are views but no view indexes present
2. There are no views.
We need to migrate the view Index table to corresponding namespace in both the
cases.
> UpgradeUtil.upgradeTable does not upgrade view index physical table of
> multi-tenant tables if there are no view indexes currently
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-4434
> URL: https://issues.apache.org/jira/browse/PHOENIX-4434
> Project: Phoenix
> Issue Type: Bug
> Reporter: Thomas D'Silva
>
> We pre-create the physical view index table for multi-tenant tables at
> creation time.
> The following code does not handle this case
> {code}
> // check whether table is properly upgraded before upgrading indexes
> if (table.isNamespaceMapped()) {
> for (PTable index : table.getIndexes()) {
> String srcTableName = index.getPhysicalName().getString();
> String destTableName = null;
> String phoenixTableName = index.getName().getString();
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)