> 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. > > Hitesh Khamesra wrote: > i don't think so, it will called after 1 second period or when new member > will be added
We don't know how long something might run. Which means, it might run a few times. I'm just conscious that it might run multiple times, and creating new HashSets each time just creates more garbage. But happy for you to leave it if you think it will not cause issues. > 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. > > Hitesh Khamesra wrote: > We can do that way as well. But then every accesor has to do. I'm torn on this one... I don't see a need to force a new collection everytime, but on the other hand.. being safe hasn't killed anyone. - Udo ----------------------------------------------------------- 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 > >
