wecharyu opened a new pull request, #5780: URL: https://github.com/apache/hive/pull/5780
### What changes were proposed in this pull request? Fix the bug in `ObjectStore#openTransaction` and `ObjectStore#rollbackTransaction`. ### Why are the changes needed? Currently `rollbackTransaction()` always reset `openTransactionCalls` to 0, but it would cause unbalanced issue in nested transaction calls, for example: ```bash openTransaction() // new function1 { openTransaction() commitTransaction() # place1 } // new function2 { openTransaction() commitTransaction() } commitTransaction() # place2 ``` If the new function1 rollbackTransaction in place1, then it would get unbalanced exception in place2. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Add a unit test: ```bash mvn test -Dtest.groups= -Dtest=org.apache.hadoop.hive.metastore.TestObjectStore#testNestedTransaction -pl :hive-standalone-metastore-server ``` -- 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