palashc commented on code in PR #1666:
URL: https://github.com/apache/phoenix/pull/1666#discussion_r1342971828


##########
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java:
##########
@@ -903,7 +903,7 @@ private boolean 
addColumnsAndIndexesFromAncestors(MetaDataMutationResult result,
                 String parentSchemaName = 
SchemaUtil.getSchemaNameFromFullName(parentName);
                 tableName = SchemaUtil.getTableNameFromFullName(parentName);
                 MetaDataMutationResult parentResult = 
updateCache(connection.getTenantId(), parentSchemaName, tableName,
-                        false, resolvedTimestamp);
+                        true, resolvedTimestamp);

Review Comment:
   @shahrs87  `MetaDataClient.updateCache` eventually calls this method 
`addColumnsAndIndexesFromAncestors` which looks up ancestors of views and view 
indexes and recursively calls `MetaDataClient.updateCache` on every parent 
table up the hierarchy. Currently, the value of `alwaysHitServer` is false for 
all these recursive calls i.e. we will look up the ancestors in the local cache 
if UPDATE_CACHE_FREQUENCY is set to NEVER. Setting it to true bypasses all 
checks for avoiding the rpc to get table 
([code](https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java#L749))
 and updates the entire hierarchy. 
   



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