ashish-kumar-sharma commented on a change in pull request #1610:
URL: https://github.com/apache/hive/pull/1610#discussion_r578572870
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java
##########
@@ -2187,8 +2160,10 @@ public void addPrimaryKeysToCache(String catName, String
dbName, String tblName,
cacheLock.readLock().lock();
String tblKey = CacheUtils.buildTableKey(catName, dbName, tblName);
TableWrapper tblWrapper = tableCache.getIfPresent(tblKey);
- if (tblWrapper != null) {
- tblWrapper.cachePrimaryKeys(keys, false);
+ if ((tblWrapper != null) && tblWrapper.isConstraintsValid()) {
+ // Because lake of snapshot freshness validation.
+ // For now disabling cached constraint snapshot addition in parts by
invalidating constraint snapshot.
+ tblWrapper.inValidateConstraints();
Review comment:
Resolved
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
##########
@@ -2674,28 +2554,19 @@ long getPartsFound() {
catName = StringUtils.normalizeIdentifier(catName);
dbName = StringUtils.normalizeIdentifier(dbName);
tblName = StringUtils.normalizeIdentifier(tblName);
- if (!shouldCacheTable(catName, dbName, tblName) || (canUseEvents &&
rawStore.isActiveTransaction())) {
+ if (!shouldCacheTable(catName, dbName, tblName) || (canUseEvents &&
rawStore.isActiveTransaction()) || !sharedCache
Review comment:
Done
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]