-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
EclipseLinkJpaDialect: Unexpected default isolation levels #29997
Comments
Relates to #24802 - the isolation level support for EclipseLink is somewhat broken and only really works properly in single-threaded scenarios with consistent isolation level declarations. We need to revisit what we're doing about isolation levels there: It might be better to deprecate isolation level support with EclipseLink to begin with - since we do not have APIs for proper per-transaction transaction isolation there but rather apparently just a system-wide shared isolation level setting in DatabaseLogin. |
Since EclipseLink applies a custom transaction isolation value to its shared |
…begin Since EclipseLink applies a custom transaction isolation value to its shared DatabasePlatform instance, we need to immediately restore the original value after the current value got picked up for JDBC Connection access inside of EclipseLink. In order to not interfere with concurrent transactions, we need to use synchronization around the transaction begin sequence in such a case. Closes gh-29997
Hi, |
Good point, this can be improved through identical synchronization around the |
The additional synchronization applied to the regular non-lazy transaction begin case is making it into 6.0.10 now, whereas the 5.3.28 backport will remain limited to the original purpose of a more reliable code path for consistent isolation level usage (while leaving the default code path untouched). Corresponding documentation of the care to be taken will be available in the javadoc. |
Affects: 6.0.4
(and before)
It seems that in some cases EclipseLinkJpaDialect doesn't handle correctly isolation levels.
For instance in the following flow:
I suppose that EclipseLinkJpaDialect#beginTransaction should set the DEFAULT isolation level to DatabasePlatform instead explicitly doing nothing in that case. Or, somehow DatabasePlatform's isolation level shall be reset after transaction.
I'm attaching a reproducer (reproducer.zip, main method to be considered is Reproducer#repoduce) that shows that:
Note: reproducer is configured to use local mysql database (see the application properties) .
The text was updated successfully, but these errors were encountered: