> On June 28, 2016, 9:36 p.m., Darrel Schneider wrote:
> > geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java,
> >  line 589
> > <https://reviews.apache.org/r/49329/diff/1/?file=1431990#file1431990line589>
> >
> >     Why do you release the sync BEFORE iterating the hostedTXStates?

Iterate through hostedTXStates map and trying acquire the ReentrantLock of a 
TXStateProxyImpl could lead to dead lock, as another p2p thread processing a 
commit message could hold the ReentrantLock while trying to get the 
synchronized lock of the hostedTXStates map to remove the TXStateProxyImpl from 
the map.


> On June 28, 2016, 9:36 p.m., Darrel Schneider wrote:
> > geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java,
> >  line 162
> > <https://reviews.apache.org/r/49329/diff/1/?file=1431990#file1431990line162>
> >
> >     why make this concurrent? Every place (except close) that uses this map 
> > first synchronizes on it.

Avoid using ConcurrentHashMap by dump TXStateProxy to an array and iterate 
through that during close().


- Eric


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49329/#review139868
-----------------------------------------------------------


On June 29, 2016, 8 p.m., Eric Shu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49329/
> -----------------------------------------------------------
> 
> (Updated June 29, 2016, 8 p.m.)
> 
> 
> Review request for geode, Darrel Schneider and Swapnil Bawaskar.
> 
> 
> Bugs: GEODE-1607
>     https://issues.apache.org/jira/browse/GEODE-1607
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Fix ConcurrentModificationException during cache close
> 
> 
> Diffs
> -----
> 
>   
> geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
>  1512234 
> 
> Diff: https://reviews.apache.org/r/49329/diff/
> 
> 
> Testing
> -------
> 
> precheckin
> 
> 
> Thanks,
> 
> Eric Shu
> 
>

Reply via email to