]
Ryan Emerson resolved ISPN-8632.
--------------------------------
Resolution: Done
ConflictManager can cause deadlock on cache shutdown
----------------------------------------------------
Key: ISPN-8632
URL:
https://issues.jboss.org/browse/ISPN-8632
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.2.0.Beta1
Reporter: Ryan Emerson
Assignee: Ryan Emerson
Fix For: 9.2.0.Beta2
If stop is called on an EmbeddedCacheManager when the conflict resolution stage of a
merge in ongoing, then it is impossible for ClusterCacheStatus::doLeave to proceed as
ClusterCacheStatus::onPartitionMerge holds the ClusterCacheStatus lock. This is fine if
conflict resolution completes successfully, however it is possible that the
StateProviderImpl on the remote nodes has shutdown and therefore it's not possible for
the ReplicaSpliterator to complete its execution and deadlock occurs.
To prevent the above scenario we should improve how the StateReceiverImpl and
DefaultConflictManager handle stopping caches. Furthermore, we should also introduce a
timeout when attempting to discover cache conflicts.