Behavior of AgroalDataSource After Transaction Timeout #44970
Unanswered
nakamura-to
asked this question in
Q&A
Replies: 2 comments 3 replies
-
We'll need @barreiro to tell us if it's intentional or not. Out of curiosity, what are the consequences for you exactly? This auto-commit will fail anyway, right? Are you just bothered by the unnecessary error logs, or are there other consequences? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After a transaction is rolled back due to a timeout,
AgroalDataSource
returns a connection with auto-commit mode set totrue
. As a result, any transactions using that connection are committed.Is this behavior intentional?
I would expect an exception to be thrown if any of the connection's methods are invoked after the timeout.
You can find reproducible code here.
The reproducible project was created by modifying the hibernate-orm-quickstart.
Below is the log output from executing the reproducible code.
It shows that the connection's auto-commit mode changes before and after the timeout.
Beta Was this translation helpful? Give feedback.
All reactions