deniskuzZ commented on code in PR #5780: URL: https://github.com/apache/hive/pull/5780#discussion_r2079684168
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java: ########## @@ -629,13 +622,13 @@ public boolean commitTransaction() { LOG.error("Unbalanced calls to open/commit Transaction", e); throw e; } - openTrasactionCalls--; - debugLog("Commit transaction: count = " + openTrasactionCalls + ", isactive "+ currentTransaction.isActive()); - if ((openTrasactionCalls == 0) && currentTransaction.isActive()) { + debugLog("Commit transaction: count = " + openTrasactionCalls + ", isactive "+ currentTransaction.isActive()); + if ((openTrasactionCalls == 1) && currentTransaction.isActive()) { transactionStatus = TXN_STATUS.COMMITED; currentTransaction.commit(); } + openTrasactionCalls--; Review Comment: what if commit throws RuntimeException, db txn would be closed, but openTrasactionCalls won't be 0 -- 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