sanjeet006py commented on code in PR #2041:
URL: https://github.com/apache/phoenix/pull/2041#discussion_r1884558908


##########
phoenix-core-client/src/main/java/org/apache/phoenix/schema/PMetaDataImpl.java:
##########
@@ -83,14 +83,27 @@ private void updateGlobalMetric(PTableRef pTableRef) {
 
     @Override
     public PTableRef getTableRef(PTableKey key) throws TableNotFoundException {
+        return getTableRef(key, false);
+    }
+
+    @Override
+    public PTableRef getTableRefOptimized(PTableKey key) {
+        try {
+            return getTableRef(key, true);
+        } catch (TableNotFoundException e) {
+            throw new IllegalStateException(e);
+        }
+    }
+
+    private PTableRef getTableRef(PTableKey key, boolean 
doNotThrowTableNotFoundException) throws TableNotFoundException {

Review Comment:
   Actually, [PHOENIX-7486](https://issues.apache.org/jira/browse/PHOENIX-7486) 
is a more of generic JIRA for finding and fixing other occurrences of this anti 
pattern. I fixed one in here as that was contributing to the regressed numbers. 
W/o the change in `PMetadataImpl` I was able to bring down regression to 30-40% 
from 5K-4K% but need this change to bring it down to 0.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to