We're updating the issue view to help you get more done. 

StaleStateException/OptimisticLockException doesn't cause infinispan 2nd level cache to invalidate

Description

If the hibernate 2nd level cache has a versioned entity which is less than the version in db, it will throw StaleDataException (expected), but at that point I expect hibernate to invalidate the cache so the next find will go to db to find correct version of entity. On our production, once hibernate has an old value, it just keeps throwing the exception until we manually clear the cache. EhCache seems to invalidate the cache as I would expect.

Environment

java 1.8.0_152, infinispan core 8.2.6.Final, hibernate 5.2.12

Status

Assignee

Unassigned

Reporter

Tom Dearman

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.2.12

Priority

Major