Do not evict removed entries, otherwise removes can be lost.
@@ -3731,6 +3731,10 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
if (obsoleteVersionExtras() != null)
return true;
+ // TODO GG-11241: need keep removed entries in heap map, otherwise removes can be lost.
+ if (cctx.deferredDelete() && deletedUnlocked())
+ return false;
+
if (!hasReaders() && markObsolete0(obsoleteVer, false, null)) {
// Nullify value after swap.
value(null);
@@ -3767,6 +3771,10 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
// Version has changed since entry passed the filter. Do it again.
continue;
+ // TODO GG-11241: need keep removed entries in heap map, otherwise removes can be lost.
+ if (cctx.deferredDelete() && deletedUnlocked())
+ return false;
+
if (!hasReaders() && markObsolete0(obsoleteVer, false, null)) {
// Nullify value after swap.
value(null);
