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/10/14 15:12:50 UTC

[GitHub] [phoenix] virajjasani commented on a change in pull request #920: PHOENIX-6129 : Avoid redundant Admin API call in the absence of SYSTEM.MUTEX table

virajjasani commented on a change in pull request #920:
URL: https://github.com/apache/phoenix/pull/920#discussion_r504759424



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
##########
@@ -4294,11 +4295,9 @@ public boolean acquireUpgradeMutex(long currentServerSideTableTimestamp)
     public boolean writeMutexCell(String tenantId, String schemaName, String tableName,
             String columnName, String familyName) throws SQLException {
         try {
-            byte[] rowKey =
-                    columnName != null
-                            ? SchemaUtil.getColumnKey(tenantId, schemaName, tableName, columnName,
-                                familyName)
-                            : SchemaUtil.getTableKey(tenantId, schemaName, tableName);
+            byte[] rowKey = columnName != null ?
+                SchemaUtil.getColumnKey(tenantId, schemaName, tableName, columnName, familyName) :
+                SchemaUtil.getTableKey(tenantId, schemaName, tableName);
             // at this point the system mutex table should have been created or
             // an exception thrown
             byte[] sysMutexPhysicalTableNameBytes = getSysMutexPhysicalTableNameBytes();

Review comment:
       If `getSysMutexPhysicalTableNameBytes()` start throwing `TableNotFoundException`, then at this point the Exception would be thrown and caught, so we would not go ahead with next `getTable()` call.




----------------------------------------------------------------
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