[ https://issues.apache.org/jira/browse/GEODE-8790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260829#comment-17260829 ]
ASF GitHub Bot commented on GEODE-8790: --------------------------------------- luissson commented on a change in pull request #5851: URL: https://github.com/apache/geode/pull/5851#discussion_r553586928 ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/map/RegionMapDestroy.java ########## @@ -372,6 +372,8 @@ private void retryRemoveWithTombstone() { } finally { removeEntryOrLeaveTombstone(); } + } else if (regionEntry == null && !newRegionEntry.isTombstone()) { Review comment: I moved a bit fast here with the first solution, as it appears we fail to pass the unit test evictDestroyOfExistingTombstoneWithConcurrencyChecksReturnsFalse. Suggesting that we don't properly handle the case where we're in an eviction and already set the region entry as tombstone. If we break up the check on isEviction and newRegionEntry.isTombstone we cause more unit tests to fail. With the current issue, we're trying to catch the specific case where we have concurrency checks enabled, we're in an eviction, and we've created a new region entry marked as tombstone. I've restructured retryRemoveWithTombstone some so eviction and non-evictions go down the same path, and avoids a clause with a lone call to removeEntryOrLeaveTombstone that addresses this issue and passes unit tests. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Evicted entries sometimes remain in region map > ---------------------------------------------- > > Key: GEODE-8790 > URL: https://issues.apache.org/jira/browse/GEODE-8790 > Project: Geode > Issue Type: Bug > Components: eviction > Affects Versions: 1.1.0, 1.14.0 > Reporter: Louis R. Jacome > Assignee: Louis R. Jacome > Priority: Major > Labels: blocks-1.14.0, pull-request-available > > Sometimes an entry set for eviction will remain in the region map after > falling into an unhandled case in RegionMapDestroy.retryRemoveWithTombstone. > When testing the LRU capacity of a region, we create many entries beyond the > LRU capacity, causing evictions. We sometimes run into a case where two > threads compete to remove the same entry. One thread succeeds and removes it > from the region map, while the other thread, in removal progress, will create > a temporary entry in the map that does not get properly removed/handled. -- This message was sent by Atlassian Jira (v8.3.4#803005)