L2 entity cache is evicted prior to committing transaction for HQL/native updates

Description

This issue occurs when using a read-write cache concurrency strategy, and applying an update or delete as part of an HQL or native sql query.

The L2 entity cache gets cleared before the transaction is committed.

This can lead to scenarios where a different session is able to populate the cache with the old data, leaving the cache out-of-date.

Environment

None

Assignee

Frank Doherty

Reporter

Frank Doherty

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.2.18

Components

Affects versions

Priority

Major
Configure