second level cache invalidation messages should be sent by hibernate-infinispan in a cluster

Description

The AS StatefulWithXPCFailoverTestCase test found a regression in Hibernate 4.1.9. The failure may still show at http://hudson.jboss.org/hudson/job/as7-param-pull/5123

org.hibernate.cache.infinispan.access.TransactionalAccessDelegate.remove(Object) is failing to send invalidation message to other cluster members because TransactionalAccessDelegate.writeCache is using CACHE_MODE_LOCAL.

I was able to pass the AS test by changing TransactionalAccessDelegate from:

1 2 3 4 5 6 7 8 9 public TransactionalAccessDelegate(BaseRegion region, PutFromLoadValidator validator) { this.region = region; this.cache = region.getCache(); this.putValidator = validator; this.writeCache = Caches.isInvalidationCache(cache) ? Caches.ignoreReturnValuesCache(cache, Flag.CACHE_MODE_LOCAL) : Caches.ignoreReturnValuesCache(cache); }

To:

1 2 3 4 5 6 7 public TransactionalAccessDelegate(BaseRegion region, PutFromLoadValidator validator) { this.region = region; this.cache = region.getCache(); this.putValidator = validator; this.writeCache = Caches.ignoreReturnValuesCache(cache); this.putFromLoadCache = Caches.ignoreReturnValuesCache(cache); }

We are also using Flag.CACHE_MODE_LOCAL with the query cache (event & put cache) and in BaseRegion class.

Environment

None

Status

Assignee

Galder Zamarreno

Reporter

Scott Marlow

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

4.1.9

Priority

Major
Configure