Files
spring-integration/spring-integration-jdbc
Artem Bilan e66741c7c6 GH-9481: Fix JdbcMetadataStore for PostgreSQL & MySQL
Fixes: #9481
Issue link: https://github.com/spring-projects/spring-integration/issues/9481

MySQL throws `CannotAcquireLockException` in case of duplicate key failure.
PostgreSQL just rollbacks a transaction not letting us move on with a `SELECT`

* Include `TransientDataAccessException` to the catch block of the `INSERT`
to ignore it for the subsequent `SELECT`
* Add logic to determine `PostgreSQL` database vendor and include `ON CONFLICT DO NOTHING`
hint into the `INSERT` to not fail in case of duplicate key found on `putIfAbsent` operation

(cherry picked from commit 98d0266ba0)
2024-09-17 19:22:36 +00:00
..