Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 c07714c3c -> 27ddccdba
PHOENIX-3726 Error while upgrading system tables Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/27ddccdb Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/27ddccdb Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/27ddccdb Branch: refs/heads/4.x-HBase-0.98 Commit: 27ddccdbafe6df397381eb2aa519a3be5fc91241 Parents: c07714c Author: Samarth <samarth.j...@salesforce.com> Authored: Thu Mar 9 10:38:02 2017 -0800 Committer: Samarth <samarth.j...@salesforce.com> Committed: Thu Mar 9 10:38:02 2017 -0800 ---------------------------------------------------------------------- .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/27ddccdb/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index 2a6e51b..b113ad9 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -3086,8 +3086,9 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement List<String> tableNames = Arrays .asList(admin.getTableNames(QueryConstants.SYSTEM_SCHEMA_NAME + "\\..*")); if (tableNames.size() == 0) { return; } - if (tableNames.size() > 4) { throw new IllegalArgumentException( - "Expected 4 system table only but found " + tableNames.size() + ":" + tableNames); } + if (tableNames.size() > 5) { + logger.warn("Expected 5 system tables but found " + tableNames.size() + ":" + tableNames); + } byte[] mappedSystemTable = SchemaUtil .getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES, props).getName(); metatable = getTable(mappedSystemTable); @@ -3102,6 +3103,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement } tableNames.remove(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME); } + tableNames.remove(PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME); for (String table : tableNames) { UpgradeUtil.mapTableToNamespace(admin, metatable, table, props, null, PTableType.SYSTEM, null);