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
i.e. the template update returns 0 for the row count updated even though there is an entry in the database. And thus the insert is called a second time which throws a DuplicateKeyException
This behavior only shows up in Oracle. I've tested on H2, MySql and Postgresql.
We have wrapped the code in a TransactionTemplate on the Spring Cloud Task side and the same result occurred.
Also tried to use the OracleXADataSource and this also did not work.
Fixesspring-projects#3129
The `CHAR` type in Oracle is for fixed length values.
If the value is not of expected length it is padded with whitespaces.
This causes wrong assumptions when we perform queries against tables.
* Change the `CHAR` into a `VARCHAR2` in those tables for Oracle
where we don't have values with a fixed length.
In fact only `MESSAGE_ID` comes with always fixed length as `36`
because it is fully based on the `UUID`
Fixes#3129
The `CHAR` type in Oracle is for fixed length values.
If the value is not of expected length it is padded with whitespaces.
This causes wrong assumptions when we perform queries against tables.
* Change the `CHAR` into a `VARCHAR2` in those tables for Oracle
where we don't have values with a fixed length.
In fact only `MESSAGE_ID` comes with always fixed length as `36`
because it is fully based on the `UUID`
The acquire method in the DefaultLockRepository fails to acquire the lock after the initial insert of the entry in the
%s_LOCK
table.https://github.com/spring-projects/spring-integration/blob/master/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/lock/DefaultLockRepository.java#L159-L166
i.e. the template update returns
0
for the row count updated even though there is an entry in the database. And thus the insert is called a second time which throws aDuplicateKeyException
This behavior only shows up in Oracle. I've tested on H2, MySql and Postgresql.
Here is a sample application that replicates the behavior: https://github.com/cppwfs/acquirelockfailtest
And it was tested using oracle/database:12.2.0.1-se2
A little more info can be found here: spring-cloud/spring-cloud-task#640
The text was updated successfully, but these errors were encountered: