The change by itself looks right and can be merged, however I do not think this is a complete fix. What kind of running threads were using invalidated cache context? These threads may raise plenty of other exceptions if invalid context is used. I think the proper solution should block a guard (I am sure we already have a guard that we can reuse) and wait for all threads to release this guard before cleaning up the context.
2015-08-04 8:28 GMT-07:00 Denis Magda <dma...@gridgain.com>: > Hi Alex, Igniters, > > I've fixed a deadlock in GridDhtAtomicCache that was a reason of frequent > hanging of "Cache Restart" test suite. > > In short, the deadlock happened because a cache was already stopped but > some running threads, that perform cache related operations, keep using > invalidated GridCacheContext. > All the details are described here: > https://issues.apache.org/jira/browse/IGNITE-1189 < > https://issues.apache.org/jira/browse/IGNITE-1189> > > Alex, as one of earlier implementers of this code, please review the > changes. > > Regards, > Denis