Stale data found in Infinispan cache following Hibernate JPAQL UPDATE or DELETE in JBoss EAP
Issue
- A JPAQL operation is used to modify data in the database (e.g.
entityManager.createQuery("update Employee e set e.title = 'Senior Engineer'").executeUpdate();
) - The Infinispan cache region seems to be immediately purged
- Any subsequent load of the relevant entities (from another thread) loads data into the cache which will be stale as soon as the database commit for the updating thread completes.
- No invalidation of the cache region occurs following the database commit.
- This is a change in behavior compared to EAP 7.1 / Hibernate 5.1 / Infinispan 8.2
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.2
- 7.3
- Hibernate 5.3
- Infinispan
- 9.3
- 9.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.