deniskuzZ commented on code in PR #4566: URL: https://github.com/apache/hive/pull/4566#discussion_r1418814800
########## 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: won't we need this when we separate Compaction and ACID txn handlers? -- 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