]
Paul Ferraro updated WFLY-3682:
-------------------------------
Git Pull Request:
SFSB DistributedCache doesn't commit when get(...) and
release/discard(...) use different threads
-------------------------------------------------------------------------------------------------
Key: WFLY-3682
URL:
https://issues.jboss.org/browse/WFLY-3682
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Clustering
Affects Versions: 8.1.0.Final
Reporter: Paul Ferraro
Assignee: Paul Ferraro
Fix For: 8.2.0.CR1, 9.0.0.CR1
While investigating failures in
org.jboss.as.test.manualmode.ejb.client.cluster.EJBClientClusterConfigurationTestCase
following the upgrade to JGroups 3.5, I uncovered a number of critical bugs in the
DistributedCache logic.
* DistributedCache uses a thread-local stack to store the reference to a Batch across
invocations of Cache get/release/discard(...). Consequently, Infinispan's transaction
won't commit if Cache.get(...) was called from a different thread than
Cache.release(...) or Cache.discard(...)
* The implementation of the Batch SPI uses Infinispan's BatchContainer, which itself
relies on thread locals to store references to the Transaction across calls to
startBatch()/endBatch().
* Once the above issues were address, I got an NPE in
InfinispanBeanEntryExternalizer.writeObject(...) when the lastAccessedTime is null (which
is the case following creation).