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 2022/11/01 17:51:50 UTC

[GitHub] [phoenix] virajjasani commented on a diff in pull request #1522: PHOENIX-6826 Don't invalidate meta cache if CQSI#getTableRegionLocation and CQSI#getTableRegionLocation encounters IOException

virajjasani commented on code in PR #1522:
URL: https://github.com/apache/phoenix/pull/1522#discussion_r1010730690


##########
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:
##########
@@ -725,17 +725,17 @@ public List<HRegionLocation> getAllTableRegions(byte[] tableName) throws SQLExce
                 byte[] currentKey = HConstants.EMPTY_START_ROW;
                 do {
                     HRegionLocation regionLocation = ((ClusterConnection)connection).getRegionLocation(
-                            TableName.valueOf(tableName), currentKey, reload);
+                            table, currentKey, false);
                     currentKey = getNextRegionStartKey(regionLocation, currentKey);
                     locations.add(regionLocation);
                 } while (!Bytes.equals(currentKey, HConstants.EMPTY_END_ROW));
                 return locations;
             } catch (org.apache.hadoop.hbase.TableNotFoundException e) {
-                String fullName = Bytes.toString(tableName);
-                throw new TableNotFoundException(fullName);
+                throw new TableNotFoundException(table.getNameAsString());
             } catch (IOException e) {
+                LOGGER.error("Exception encountered in getAllTableRegions for table: "
+                        + table.getNameAsString(), e);

Review Comment:
   How about we keep this just above throwing `SQLExceptionInfo.Builder(SQLExceptionCode.GET_TABLE_REGIONS_FAIL)` ? That way we will not log this twice but rather only once when we actually throw the Exception `GET_TABLE_REGIONS_FAIL`



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

To unsubscribe, e-mail: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org