> On May 2, 2016, 7:29 p.m., Udo Kohlmeyer wrote:
> > geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java,
> >  line 1699
> > <https://reviews.apache.org/r/46896/diff/1/?file=1368587#file1368587line1699>
> >
> >     I don't understand why this needs to be called here as well as in the 
> > while block. You could initialize it here,but I don't think we need the 
> > extra (new HashSet()) call here as well. This call is not required.

It may not go into while loop. Thus needs to initialize it


> On May 2, 2016, 7:29 p.m., Udo Kohlmeyer wrote:
> > geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java,
> >  line 1703
> > <https://reviews.apache.org/r/46896/diff/1/?file=1368587#file1368587line1703>
> >
> >     This can potentially cause a huge amount of unnecessary garbage. Each 
> > time this method is called we create a new HashSet.

i don't think so, it will called after 1 second period or when new member will 
be added


> On May 2, 2016, 7:29 p.m., Udo Kohlmeyer wrote:
> > geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java,
> >  line 1741
> > <https://reviews.apache.org/r/46896/diff/1/?file=1368587#file1368587line1741>
> >
> >     I don't think we need synchronized here. There is no chance for any 
> > concurrent modification here. Even with mutliple threads this is still just 
> > a getter invocation, there is no danger to concurrently modify anything.

I think this is the current issue where one thread is itersating over 
collection and other is adding.


> On May 2, 2016, 7:29 p.m., Udo Kohlmeyer wrote:
> > geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java,
> >  line 1742
> > <https://reviews.apache.org/r/46896/diff/1/?file=1368587#file1368587line1742>
> >
> >     I don't think we need to explicitly create a new HashSet for a getter. 
> > If this set needs to be "cloned" then make it the responsibility of the 
> > method invoking this function to do so.

We can do that way as well. But then every accesor has to do.


- Hitesh


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


On May 2, 2016, 4:36 p.m., Hitesh Khamesra wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46896/
> -----------------------------------------------------------
> 
> (Updated May 2, 2016, 4:36 p.m.)
> 
> 
> Review request for geode, Bruce Schuchardt, Jianxia Chen, and Udo Kohlmeyer.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> added synchronization with copyOnread
> 
> 
> Diffs
> -----
> 
>   
> geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
>  9f5648b 
> 
> Diff: https://reviews.apache.org/r/46896/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Hitesh Khamesra
> 
>

Reply via email to