phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <...@git.apache.org>
Subject [GitHub] phoenix pull request #303: PHOENIX-3534 Support multi region SYSTEM.CATALOG ...
Date Wed, 04 Jul 2018 23:19:57 GMT
Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/303#discussion_r200208444
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java ---
    @@ -1893,26 +1981,45 @@ public static void upgradeTable(PhoenixConnection conn, String
srcTable) throws
                             conn.commit();
                         }
                         conn.getQueryServices().clearTableFromCache(
    -                            conn.getTenantId() == null ? ByteUtil.EMPTY_BYTE_ARRAY :
conn.getTenantId().getBytes(),
    +                            tenantIdBytes,
                                 index.getSchemaName().getBytes(), index.getTableName().getBytes(),
                                 PhoenixRuntime.getCurrentScn(readOnlyProps));
                     }
                     updateIndexesSequenceIfPresent(conn, table);
                     conn.commit();
    -
                 } else {
                     throw new RuntimeException("Error: problem occured during upgrade. Table
is not upgraded successfully");
                 }
                 if (table.getType() == PTableType.VIEW) {
                     logger.info(String.format("Updating link information for view '%s' ..",
table.getTableName()));
                     updateLink(conn, oldPhysicalName, newPhysicalTablename,table.getSchemaName(),table.getTableName());
                     conn.commit();
    -
    +                
    +                // if the view is a first level child, then we need to create the PARENT_TABLE
link
    +                // that was overwritten by the PHYSICAL_TABLE link 
    --- End diff --
    
    Ah, good. So we'll be consistent with the parent link now, right?


---

Mime
View raw message