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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/functions/ReleaseMaterializationRebuildLocks.java:
##########
@@ -53,14 +53,16 @@ public Long execute(MultiDataSourceJdbcResource 
jdbcResource) throws MetaExcepti
     LOG.debug("Going to execute query <{}>", selectQ);
 
     jdbcResource.getJdbcTemplate().query(selectQ, rs -> {
-      long lastHeartbeat = rs.getLong(2);
-      if (lastHeartbeat < timeoutTime) {
-        // The heartbeat has timeout, double check whether we can remove it
-        long txnId = rs.getLong(1);
-        if (validTxnList.isTxnValid(txnId) || 
validTxnList.isTxnAborted(txnId)) {
-          // Txn was committed (but notification was not received) or it was 
aborted.
-          // Either case, we can clean it up
-          txnIds.add(txnId);
+      if (rs.next()) {

Review Comment:
   No need to close it, it will be closed by Spring JDBCTemplate.



-- 
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]

Reply via email to