veghlaci05 commented on code in PR #4566:
URL: https://github.com/apache/hive/pull/4566#discussion_r1418821749


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -546,61 +518,28 @@ public long findMinOpenTxnIdForCleaner() throws 
MetaException {
   @RetrySemantics.Idempotent
   @Deprecated
   public long findMinTxnIdSeenOpen() {
-    if (!useMinHistoryLevel || useMinHistoryWriteId) {
+    if (!TxnHandlingFeatures.useMinHistoryLevel() || 
TxnHandlingFeatures.useMinHistoryWriteId()) {
       return Long.MAX_VALUE;
     }
     try {
       Long minId = jdbcResource.getJdbcTemplate().queryForObject("SELECT 
MIN(\"MHL_MIN_OPEN_TXNID\") FROM \"MIN_HISTORY_LEVEL\"",
           new MapSqlParameterSource(), Long.class);
       return minId == null ? Long.MAX_VALUE : minId;
     } catch (DataAccessException e) {
-      if (e.getCause() instanceof SQLException) {
-        if (dbProduct.isTableNotExistsError((SQLException) e.getCause())) {
-          useMinHistoryLevel = false;
-          return Long.MAX_VALUE;
-        }
+      if (dbProduct.isTableNotExistsError(e)) {
+        TxnHandlingFeatures.setUseMinHistoryLevel(false);
+        return Long.MAX_VALUE;
       }
       LOG.error("Unable to execute findMinTxnIdSeenOpen", e);
       throw e;
     }
   }
 
-  @Override
-  protected void updateWSCommitIdAndCleanUpMetadata(Statement stmt, long 
txnid, TxnType txnType, 

Review Comment:
   A follow up task has already been created for it. IT would made this PR even 
larger so I did not do it now.



-- 
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: gitbox-unsubscr...@hive.apache.org

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

Reply via email to