wecharyu commented on PR #5780: URL: https://github.com/apache/hive/pull/5780#issuecomment-2840815511
> Per my understanding, this shouldn't happen, imaging we rollback the transaction at place1, then the ObjectStore openTrasactionCalls is reset to 0, if we continue to execute, then means we have one openTransaction and two commitTransaction, the commitTransaction at place2 should throw the exception: > ```java > if (openTrasactionCalls <= 0) { > RuntimeException e = new RuntimeException("commitTransaction was called but openTransactionCalls = " > + openTrasactionCalls + ". This probably indicates that there are unbalanced " + > "calls to openTransaction/commitTransaction"); > LOG.error("Unbalanced calls to open/commit Transaction", e); > throw e; > } > ``` >the Metastore client call should get this exception, but our tests work fine. Yes it works now because current code does not put `get_xxx` and `create_xxx` into the same transaction, it would fail if we openTransaction at the top of a create_xxx api. Additionally, the failed tests in this PR reveal following unbalanced calls that are hidden by current implementation: - `commitTransaction()` twice for a `openTransaction()` - `rollbackTransaction()` even it does not call `openTransaction()` -- 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