Replies: 5 comments 6 replies
-
Found the issue description: https://issues.redhat.com/browse/ISPN-12787 It doesn't directly explain the behavior, but still seems related. Would be interested in hearing from @tristantarrant or @wburns on this. |
Beta Was this translation helpful? Give feedback.
-
The description is on the JIRA although it might be a bit hard to read. EAP/Wildfly changed how they called to invalidate caches and the QE team found that due to that there was stale data in the 2LC as the cache was cleared eagerly before the commit. This JIRA didn't cause more clears to be done it just made it so the clear was done at the commit time. This JIRA is likely not the culprit, but since EAP/Wildlfy changed how they invoked the invalidation step, there may be a change there that is causing this. @pferraro may know more as well. |
Beta Was this translation helpful? Give feedback.
-
Well, that certainly sounds related. :-) Thanks for the heads-up - any thoughts @pferraro? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I fully understand the problem. Native update/delete queries are not generally compatible with read/write 2LC regions hence the need to conservatively clear these cache regions as a consequence. |
Beta Was this translation helpful? Give feedback.
-
We found that there were actually two issues at play here. One was the use of native update queries without calls to The other problem was that, in some cases, the native queries were being executed outside of a transaction. By default, Hibernate does not allow this and will generate an exception. However, we had apparently set the Unfortunately, this can cause an L2 cache to become permanently locked and refuse to accept new entries. The calls to lock and clear the cache occurs when a native query's This is not an Infinispan issue; however, I wanted to share this information in case it is of interest to the developers (@wburns and @tristantarrant) or other users. |
Beta Was this translation helpful? Give feedback.
-
Per earlier discussion, our application exhibited reduced performance after upgrading from WildFly 20 (Infinispan 10.1) to WildFly 26 (Infinispan 12.1). It seems that the issue may have been due to our use of native SQL queries in conjunction with L2 caches. By default, Hibernate will invalidate all caches when a native update or delete query is executed. We are now working around this issue by calling
addSynchronizedQuerySpace()
where necessary. However, we are still trying to understand why this was not a problem in earlier versions. I am wondering if it might be related to this commit:ISPN-12787 Non-transactional cache needs to be invalidated after commit on JPQL update/delete operation
This change was merged to 12.1 and could potentially explain the behavior we are seeing.
Would it be possible to see the issue description for ISPN-12787? I was not able to find it anywhere.
Beta Was this translation helpful? Give feedback.
All reactions