SourabhBadhya commented on code in PR #3576:
URL: https://github.com/apache/hive/pull/3576#discussion_r1119563491
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -1535,20 +1556,14 @@ public void setHadoopJobId(String hadoopJobId, long id)
{
@Override
@RetrySemantics.Idempotent
public long findMinOpenTxnIdForCleaner() throws MetaException {
- Connection dbConn = null;
try {
- try {
- dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED,
connPoolCompaction);
+ try (Connection dbConn =
getDbConn(Connection.TRANSACTION_READ_COMMITTED, connPoolCompaction)) {
return getMinOpenTxnIdWaterMark(dbConn);
} catch (SQLException e) {
- LOG.error("Unable to getMinOpenTxnIdForCleaner", e);
- rollbackDBConn(dbConn);
- checkRetryable(e, "getMinOpenTxnForCleaner");
- throw new MetaException("Unable to execute getMinOpenTxnIfForCleaner()
" +
- e.getMessage());
- } finally {
- closeDbConn(dbConn);
- }
+ LOG.error("Unable to findMinOpenTxnIdForCleaner", e);
+ checkRetryable(e, "findMinOpenTxnIdForCleaner");
+ throw new MetaException("Unable to execute getMinOpenTxnIfForCleaner()
" + e.getMessage());
Review Comment:
nit: Typo - `getMinOpenTxnIdForCleaner` instead of
`getMinOpenTxnIfForCleaner`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]