-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PgClient. Commit transaction after exception. #1369
Comments
Can you please create a small reproducer and share it on a public git repo? Ideally with testcontainers for the db setup |
I'll try to make time for that next week |
it would be good also for the reproducer to be in java and avoid kotlin |
I tried to reproduce the error, but in pure Java the system doesn't hang on commit. Unfortunately, I could not get the same behavior as in Kotlin. But nevertheless, after rolling back a checkpoint, the transaction is not committed, but the transaction is rolled back. Because after the checkpoint rollback the transaction must be valid and the transaction commit must be allowed. There are no plans to implement such behavior in the future?
|
Questions
I have encountered some strange transaction behaviour. If I execute a query after the transaction starts, create a checkpoint, then this query terminates with an exception (in my case an index constraint error). Then I rollback the checkpoint, and after that when commit transaction the system hangs. At the same time rollback works. In Debug I saw that there is a flag failed in the transaction object. Is this how it should be or am I doing something wrong?
Version
4.4.6
Context
Language
Kotlin
Packages
Location
Vertx Verticle
Code
After stuck on the line
transaction.commit().await()
. With a query in PostgreSQL, I can see that the last query from the application to the database isROLLBACK
.PS Everything works fine if I manually make BEGIN/COMMIT requests with SqlConnection instead
sqlConnection.begin()
/transaction.commit()
.The text was updated successfully, but these errors were encountered: