shahrs87 commented on code in PR #1807:
URL: https://github.com/apache/phoenix/pull/1807#discussion_r1473634705


##########
phoenix-core-client/src/main/java/org/apache/phoenix/schema/PMetaDataImpl.java:
##########
@@ -162,7 +162,11 @@ public void addTable(PTable table, long resolvedTime) 
throws SQLException {
             metaData.put(table.getKey(), tableRef);
         }
         for (PTable index : table.getIndexes()) {
-            metaData.put(index.getKey(), tableRefFactory.makePTableRef(index, 
this.timeKeeper.getCurrentTime(), resolvedTime));
+            PTable indexPTable = index;

Review Comment:
   We add an index to the cache at L160 and L162 above. 
   There is a specific check whether the table is an index or not at L133 
above. 
   If the table  is an index, then codepath between L133-L156 is executed where 
we will miss adding the parent link to the cache.



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