adesh-rao commented on a change in pull request #1109: URL: https://github.com/apache/hive/pull/1109#discussion_r449528837
########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java ########## @@ -867,6 +909,77 @@ private void updateTableColStats(RawStore rawStore, String catName, String dbNam } } + private void updateTableForeignKeys(RawStore rawStore, String catName, String dbName, String tblName) { + LOG.debug("CachedStore: updating cached foreign keys objects for catalog: {}, database: {}, table: {}", catName, + dbName, tblName); + try { + Deadline.startTimer("getForeignKeys"); + List<SQLForeignKey> fks = rawStore.getForeignKeys(catName, null, null, dbName, tblName); + Deadline.stopTimer(); + sharedCache.refreshForeignKeysInCache(StringUtils.normalizeIdentifier(catName), + StringUtils.normalizeIdentifier(dbName), StringUtils.normalizeIdentifier(tblName), fks); + LOG.debug("CachedStore: updated cached foreign keys objects for catalog: {}, database: {}, table: {}", catName, + dbName, tblName); + } catch (MetaException e) { + LOG.info("Updating CachedStore: unable to read foreign keys of catalog: " + catName + ", database: " Review comment: Fixed. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org