virajjasani commented on code in PR #2658:
URL: https://github.com/apache/phoenix/pull/2658#discussion_r4503237415
##########
phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexCDCConsumer.java:
##########
@@ -319,8 +326,42 @@ private PTable getDataTable(PhoenixConnection conn) throws
SQLException {
return dataTable;
}
+ /**
+ * Reads the data table definition from SYSTEM.CATALOG. The metadata cache
of the region server
+ * can keep an old definition after an ALTER, for example when the region
moves to this server.
+ */
private void refreshDataTableCache(PhoenixConnection conn) throws
SQLException {
- cachedDataTable = conn.getTable(dataTableName);
+ cachedDataTable = conn.getTableNoCache(conn.getTenantId(), dataTableName);
+ }
Review Comment:
There is one problem with this. This method is also called regularly by
`generateAndApplyIndexMutations()` which is far more frequent and it will
bombard SYSTEM.CATALOG so we need to solve this.
For call from `hasEventuallyConsistentIndexes()`, it makes sense to use
`conn.getTableNoCache()`, so that's good.
--
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]