ashish-kumar-sharma commented on a change in pull request #2128:
URL: https://github.com/apache/hive/pull/2128#discussion_r642041716



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
##########
@@ -918,6 +938,29 @@ private void updateAllTableConstraints(RawStore rawStore, 
String catName, String
       }
     }
 
+    private void updateValidWriteIdList(TxnStore txnStore, String catName, 
String dbName, String tblName) {
+      catName = StringUtils.normalizeIdentifier(catName);
+      dbName = StringUtils.normalizeIdentifier(dbName);
+      tblName = StringUtils.normalizeIdentifier(tblName);
+      LOG.debug("CachedStore: updating cached table validWriteIdlist for 
catalog: {}, database: {}, table: {}", catName,
+          dbName, tblName);
+      ValidWriteIdList validWriteIdList = null;
+      try {
+        Deadline.startTimer("getValidWriteIds");
+        validWriteIdList = 
TxnCommonUtils.createValidReaderWriteIdList(txnStore.getValidWriteIds(
+            new 
GetValidWriteIdsRequest(Collections.singletonList(TableName.getDbTable(dbName, 
tblName))))
+            .getTblValidWriteIds().get(0));
+        Deadline.stopTimer();
+      } catch (Exception e) {
+        LOG.info("Updating CachedStore: unable to update table 
validWriteIdList of catalog: " + catName + ", database: "
+            + dbName + ", table: " + tblName, e);
+      }
+      if (validWriteIdList != null) {
+        sharedCache.refreshValidWriteIdListInCache(catName, dbName, tblName, 
validWriteIdList);
+        LOG.debug("CachedStore: updated cached table validWriteIdList for 
catalog: {}, database: {}, table: {}",

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]

Reply via email to