[
https://issues.apache.org/jira/browse/IGNITE-1304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14716764#comment-14716764
]
Semen Boikov commented on IGNITE-1304:
--------------------------------------
Added more tests for async operations, found that if some async operation fails
then future for next operation is completed with the same error, fixed in
master.
IGFS uses 'putAllAsync' method to update file blocks, since the same file
should not be updated concurrently, there is no need for this async operation
to wait for completion of the previous one. It is possible to introduce special
'asyncPutAll' method with 'no wait' semantic, it will not use listeners, thus
it should not cause deadlock or starvation.
Also need to check if method causing deadlock from thread dump
('GridNearOptimisticTxPrepareFuture.prepareOnTopology') should be really
executed with topology readlock held.
> Async cache operations in IGFS may cause deadlock related to topology update
> ----------------------------------------------------------------------------
>
> Key: IGNITE-1304
> URL: https://issues.apache.org/jira/browse/IGNITE-1304
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: ignite-1.4
> Reporter: Ivan Veselovsky
> Assignee: Semen Boikov
> Fix For: ignite-1.4
>
> Attachments: deadlock-1304.txt
>
>
> In an IGFS test we observe a deadlock situation related to cluster topology
> update (full thread dump is attached).
> The problem is that several threads are waiting for the topology update, at
> the same time holding the read lock of the topology version update:
> Thread #1:
>
> GridAffinityAssignmentCache.awaitTopologyVersion(GridAffinityAssignmentCache.java:450)
> ....
>
> GridNearOptimisticTxPrepareFuture.prepareOnTopology(GridNearOptimisticTxPrepareFuture.java:280)
> At the same time another thread, that wants to update the topology version,
> cannot do that because it needs the write lock of the topology update:
> Thread #2:
> at
> java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945)
> at
> o.a.i.i.processors.cache.distributed.dht.GridDhtPartitionTopologyImpl.updateTopologyVersion(GridDhtPartitionTopologyImpl.java:190)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)