You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/05/29 20:25:48 UTC

[GitHub] [phoenix] nsgupta1 commented on a change in pull request #792: PHOENIX-5920 Skip SYSTEM TABLE checks while creating phoenix connection if client has set the DoNotUpgrade config

nsgupta1 commented on a change in pull request #792:
URL: https://github.com/apache/phoenix/pull/792#discussion_r432718347



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
##########
@@ -1307,131 +1307,136 @@ private TableDescriptor ensureTableCreated(byte[] physicalTableName, PTableType
                 }
             }
 
-            try {
-                existingDesc = admin.getDescriptor(TableName.valueOf(physicalTableName));
-            } catch (org.apache.hadoop.hbase.TableNotFoundException e) {
-                tableExist = false;
-                if (tableType == PTableType.VIEW) {
-                    String fullTableName = Bytes.toString(physicalTableName);
-                    throw new ReadOnlyTableException(
-                            "An HBase table for a VIEW must already exist",
-                            SchemaUtil.getSchemaNameFromFullName(fullTableName),
-                            SchemaUtil.getTableNameFromFullName(fullTableName));
+            // If DoNotUpgrade config is set only check namespace mapping and

Review comment:
       Yes, you are right, this check should only be for system tables. I'll modify this




----------------------------------------------------------------
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:
users@infra.apache.org