----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52228/ -----------------------------------------------------------
Review request for geode, anilkumar gingade, Eric Shu, Scott Jewell, and Ken Howe. Bugs: GEODE-1885 https://issues.apache.org/jira/browse/GEODE-1885 Repository: geode Description ------- The fix for GEODE-1885 introduced a hang on off-heap regions. If a concurrent close/destroy of the region happens while other threads are modifying it then the thread doing the modification can get stuck in a hot loop that never terminates. The hot loop is in AbstractRegionMap when it tests the existing region entry it finds to see if it can be modified. If the region entry has a value that says it is removed then the operation spins around and tries again. It expects the thread that marked it as being removed to also remove it from the map. The fix for GEODE-1885 can cause a remove to not happen. So this fix does two things: 1. On retry remove the existing removed region entry from the map. 2. putEntryIfAbsent now only releases the current entry if it has an off-heap reference. This prevents an infinite loop that was caused by the current thread who just added a new entry with REMOVE_PHASE1 from releasing it (changing it to REMOVE_PHASE2) because it see that the region is closed/destroyed. Diffs ----- geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java 33e98b6ae8a795c5a7b60aa93c7384750eb9582b Diff: https://reviews.apache.org/r/52228/diff/ Testing ------- precheckin Thanks, Darrel Schneider