[ 
https://issues.apache.org/jira/browse/PHOENIX-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla updated PHOENIX-3002:
---------------------------------------------
    Attachment: PHOENIX-3002_v3.patch

[~samarthjain] Thanks for review. Here is the patch addressing the comments.
bq. So you are running the offline upgrade before establishing the first 
connection to the cluster (which is what would end up running the 4.8 upgrade 
code and will end up adding the namespace_enabled column). It should be fine 
for the offline local index upgrade to do the 4.8 upgrade along with upgrading 
the local indexes.
Yes exactly in that we need to upgrade to 4.8. Since the connection in 
UpgradeUtil#upgradeLocalIndexes is just PhoenixConnection object which does not 
do conn initialization to upgrade system table not required to do this.
{noformat}
UpgradeUtil.upgradeLocalIndexes(conn, upgradeSystemTables);
{noformat}
Instead of that doing this which set local index upgrade attrib to flase so 
that no upgrade happen during connection initialization.
{noformat}
            Properties props = new Properties();
            if (execCmd.isLocalIndexUpgrade()) {
                
props.setProperty(QueryServices.LOCAL_INDEX_CLIENT_UPGRADE_ATTRIB, "false");
            }
            conn = DriverManager.getConnection(jdbcUrl, 
props).unwrap(PhoenixConnection.class);
{noformat}
And then this will do offline upgrade.
{noformat}
            } else if(execCmd.isLocalIndexUpgrade()) {
                UpgradeUtil.upgradeLocalIndexes(conn);
            } else {
{noformat}

bq. Also, you don't need the null check here:
Now I don't need this since you already handled as part of other issue.
Please review. Thanks.

> Upgrading to 4.8 doesn't recreate local indexes
> -----------------------------------------------
>
>                 Key: PHOENIX-3002
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3002
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Rajeshbabu Chintaguntla
>            Priority: Blocker
>             Fix For: 4.8.0
>
>         Attachments: PHOENIX-3002.patch, PHOENIX-3002_v0.patch, 
> PHOENIX-3002_v1.patch, PHOENIX-3002_v2.patch, PHOENIX-3002_v3.patch
>
>
> [~rajeshbabu] - I noticed that when upgrading to 4.8, local indexes created 
> with 4.7 or before aren't getting recreated with the new local indexes 
> implementation.  I am not seeing the metadata rows for the recreated indices 
> in SYSTEM.CATALOG.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to