----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50538/#review143848 -----------------------------------------------------------
Ship it! Ship It! - anilkumar gingade On July 27, 2016, 10:59 p.m., Bruce Schuchardt wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50538/ > ----------------------------------------------------------- > > (Updated July 27, 2016, 10:59 p.m.) > > > Review request for geode, Hitesh Khamesra and Udo Kohlmeyer. > > > Bugs: GEODE-1619 > https://issues.apache.org/jira/browse/GEODE-1619 > > > Repository: geode > > > Description > ------- > > On the server side we iterate over a bucket-location map held in > RegionAdvisor for a partitioned region. When this map is updated it is > cleared and completely repopulated but there is nothing preventing other > threads from reading the map while this is going on. Consequently another > thread could see an empty or partially-filled collection and report the wrong > information to a client about where to go for a single-hop operation. > > The fix is to create a new collection and replace the old collection with the > new, updated one. Since the old collection is never modified I've changed it > from a ConcurrentHashMap to a HashMap. > > > Diffs > ----- > > > geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketAdvisor.java > 5fc9bb06367578035337faa30daac50e015a0b44 > > geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java > 8305a0d0cd4f126de77f99c6bd539f5bf72666f1 > > geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java > 3195b3512d02d12b449c4c089234f03bb2d55bf1 > > Diff: https://reviews.apache.org/r/50538/diff/ > > > Testing > ------- > > > Thanks, > > Bruce Schuchardt > >