You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running multiple concurrent DB operations with few transactions each, all of them should end succesfully eventually.
Actual Behaviour
Transactions fail randomly.
Steps To Reproduce
Setup micronaut project with JDBI (including SQL Objects) and Hikari CP,
Use PostgreSQL 15 DB (didn't test with another),
Set low CP size (e.g. 5) - this makes the failures more frequent, but even with big CP they still occur,
Prepare simple data structure with 2 tables - one table has an FK to the other,
Prepare necessary logic to handle those tables - standard CRUD operations with JDBI SQL Objects,
Prepare business logic which saves entity A containing reference to entity B - before saving entity A it should "save entity B if neccessary", i.e. fetch it from DB and if it doesn't exist save it,
Run "save entity A" operation concurrently (10 threads still failed, I didn't try with lower concurrency),
Observe some of the saves fail because of FK violation.
Expected Behavior
When running multiple concurrent DB operations with few transactions each, all of them should end succesfully eventually.
Actual Behaviour
Transactions fail randomly.
Steps To Reproduce
Environment Information
Example Application
https://github.com/marcinfigiel/demo-jdbi-error
Version
4.5.0
The text was updated successfully, but these errors were encountered: