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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -1441,6 +1480,7 @@ public void commitTxn(CommitTxnRequest rqst) throws 
NoSuchTxnException, TxnAbort
             // corresponding open txn event.
             LOG.info("Target txn id is missing for source txn id : {} and repl 
policy {}", sourceTxnId,
                 rqst.getReplPolicy());
+            jdbcTemplate.rollback();

Review Comment:
   Yes, jdbctemplate Txn requires explicit commit or rollback, because this is 
also a signal that the underlying connection can be released and put back to 
the pool. When using `@Transactional` annotation or the `TransactionTemplate` 
functional interface it is done by the framework, but I was using the lower 
lever direct approach to have fine grained control over txn and conneciton 
handling.



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