[ https://issues.apache.org/jira/browse/PHOENIX-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15340561#comment-15340561 ]
Rajeshbabu Chintaguntla commented on PHOENIX-3002: -------------------------------------------------- Thanks for review [~samarthjain] for review. PHOENIX-3002_v0 fixes compilation issue any way I will handle the review comments and upload new patch. bq. Why is this change needed? My guess is earlier the upgrade was getting triggered because of this code (getting connection through DriverManager will call ConnectionQueryServicesImpl.init()). Yes this is calling upgrade again and then there is nothing upgrade because we have already dropping the index before reaching here. That's why you are not able see the any metadata even after upgrade. Changed this because I don't see any use of creating connection with DriverManager because it adds lot of over head of checking system tables exist or not and running upgrade steps always while deleting the table. bq. If this indeed is the case then maybe you don't need to move the code out of UpgradeUtil? Still we need to move out from UpgradeUtil. it's of no use in having UpgradeUtil because we cannot go by offline upgradation until unless we have a configuration to skip upgrade while initializing the connection. The connection created in PhoenixRuntime itself upgrading local indexes we by the time we can upgradeLocalIndexes in PhoenixRuntime it's already getting upgraded. {noformat} Properties props = new Properties(); conn = DriverManager.getConnection(jdbcUrl, props).unwrap(PhoenixConnection.class); {noformat} If you are ok with configuration control upgrading during connection initialization I can make the patch to support offline upgrade as well. wdyt? > 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 > > > [~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)