Updated items do not get invalidated when cachemode is set to CacheMode.GET

Description

When the cachemode is set to CacheMode.GET and an entity is updated, the entity is not evicted from the cache. Therefore, when the entity is updated by another transaction afterwards, an exception occurs:

The problem might have to do with the execute-method in org.hibernate.action.internal.EntityUpdateAction (line 188).

The bug can be reproduced by project: https://github.com/topicusonderwijs/cachetest . When deployed, take the following steps:

  1. Click on the New MyEntity-button. A new MyEntity-instance is inserted in the database;

  2. Click on the Update last MyEntity-button. The last created MyEntity-instance is updated with CacheMode.GET;

  3. Click on the Update last MyEntity-button. An error occurs.

Environment

Wildfly 17, infinispan cachce

Assignee

Unassigned

Reporter

Julia Berkhout

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure