Description of problem: Frequently seeing the below error: ... ERROR [org.infinispan.interceptors.InvocationContextInterceptor] ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [0 milliseconds] on key [sql: select ... from ... where ...; parameters: ; named parameters: ...; transformer: org.hibernate.transform.CacheableResultTransformer@110f2] for requestor [GlobalTransaction:<null>:3786846:local]! Lock held by [null] Version-Release number of selected component (if applicable): 5.2.10.Final-redhat-1 How reproducible: Random Steps to Reproduce: Multiple threads accessing overlapping entity sets (high concurrency) Actual results: Transaction fails and must be re-executed Expected results: The error should not occur Additional info: https://hibernate.atlassian.net/browse/HHH-7898
Issued PRs https://github.com/hibernate/hibernate-orm/pull/1100 https://github.com/hibernate/hibernate-orm/pull/1101
Only the fix for JPA environment can be backported from HHH-7898. I've created a different JIRA for backporting the partial fix: https://hibernate.atlassian.net/browse/HHH-10182
https://hibernate.atlassian.net/browse/HHH-10005 will also be backported because it fixes a regression caused by HHH-7898.
Verified with EAP 6.4.5.CP.CR1.
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.