deniskuzZ commented on a change in pull request #1688:
URL: https://github.com/apache/hive/pull/1688#discussion_r530268290
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
##########
@@ -1166,6 +1166,55 @@ public long findMinOpenTxnIdForCleaner() throws
MetaException {
}
}
+ /**
+ * Returns the min txnid seen open by any active transaction
+ * @deprecated remove when min_history_level is dropped
+ * @return txnId
+ * @throws MetaException ex
+ */
+ @Override
+ @RetrySemantics.Idempotent
+ @Deprecated
+ public long findMinTxnIdSeenOpen() throws MetaException {
+ if (!useMinHistoryLevel) {
+ return -1L;
+ }
+ Connection dbConn = null;
+ try {
+ try {
+ dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
+ long minOpenTxn;
+ try (Statement stmt = dbConn.createStatement()) {
+ try (ResultSet rs = stmt.executeQuery("SELECT
MIN(\"MHL_MIN_OPEN_TXNID\") FROM \"MIN_HISTORY_LEVEL\"")) {
+ if (!rs.next()) {
+ throw new IllegalStateException("Scalar query returned no
rows?!");
Review comment:
is this even possible?
----------------------------------------------------------------
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]