Closed Postremus closed 2 years ago
/cc @Sanne, @gsmet, @yrodiere
Confirmed. Thanks for the reproducer @Postremus!
I will handle this upstream: https://hibernate.atlassian.net/browse/HHH-15082
This will be fixed once https://github.com/hibernate/hibernate-orm/pull/4823 is merged and released upstream, and we upgrade to the corresponding version of ORM in Quarkus.
Describe the bug
Everytime an StaleStateException is thrown, jdbc statements are leaked:
I believe this to be caused by following lines in Hibernate-ORM: https://github.com/hibernate/hibernate-orm/blob/5.6/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java#L3586-L3591
StaleStateException is not a subtype of SQLException.
abortBatch
is therefore never called. Other places, likeBatchingBatch#performExecution
catch both SQLException and RuntimeException, and abort the batch for both.Expected behavior
abortBatch
is called should be checked.Actual behavior
How to Reproduce?
Output of
uname -a
orver
MSYS_NT-10.0-19044 NANB7NLNVP2 3.1.7-340.x86_64 2021-03-26 22:17 UTC x86_64 Msys
Output of
java -version
openjdk 17.0.2 2022-01-18 OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8) OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: C:\eclipse\tools\apache-maven Java version: 17.0.2, vendor: Eclipse Adoptium, runtime: C:\eclipse\tools\java\17 Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Additional information
No response