yanxinyi commented on a change in pull request #952:
URL: https://github.com/apache/phoenix/pull/952#discussion_r517022108
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
##########
@@ -3821,17 +3823,37 @@ public void upgradeSystemTables(final String url, final
Properties props) throws
}
sysCatalogTableName =
SchemaUtil.getPhysicalName(SYSTEM_CATALOG_NAME_BYTES,
this.getProps()).getNameAsString();
if (SchemaUtil.isNamespaceMappingEnabled(PTableType.SYSTEM,
ConnectionQueryServicesImpl.this.getProps())) {
+ String snapshotName = null;
// Try acquiring a lock in SYSMUTEX table before migrating
the tables since it involves disabling the table.
if (acquiredMutexLock =
acquireUpgradeMutex(MetaDataProtocol.MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP)) {
LOGGER.debug("Acquired lock in SYSMUTEX table for
migrating SYSTEM tables to SYSTEM namespace "
+ "and/or upgrading " + sysCatalogTableName);
+ snapshotName = getSysTableSnapshotName(
+ currentServerSideTableTimeStamp,
SYSTEM_CATALOG_NAME);
+ createSnapshot(snapshotName, SYSTEM_CATALOG_NAME);
+ systemTableToSnapshotMap.put(SYSTEM_CATALOG_NAME,
+ snapshotName);
+ LOGGER.debug("Created snapshot for {}",
SYSTEM_CATALOG_NAME);
Review comment:
nit: we should change the logging level from debug to info since this
rarely happens, and we need this information for sure.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]