anton-vinogradov commented on code in PR #13316:
URL: https://github.com/apache/ignite/pull/13316#discussion_r3595899443
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java:
##########
@@ -153,6 +157,9 @@ public abstract class GridNearAtomicAbstractUpdateFuture
extends GridCacheFuture
/** Handle binary in interceptor operation flag. */
protected boolean keepBinaryInInterceptor;
+ /** Near entries reserved against eviction for the time of update. */
+ protected Map<KeyCacheObject, GridNearCacheEntry> reservedEntries;
Review Comment:
Here is a cache with NO eviction policy at all — plain `new
NearCacheConfiguration<>()`, nothing else:
`testNearDeleteHistoryPurgeWithoutEvictionPolicy` (just pushed). With your line
commented out it fails:
```
expected:<4> but was:<100>
```
Why: even without a policy, near entries do get removed — delete-history
tombstones (the empty entries left by removes) are purged on remove-queue
rollover via `markObsoleteVersion` → `markObsolete0`
(`GridNearAtomicCache.onDeferredDelete` → `removeVersionedEntry`), and
`markObsolete0` returns `false` while an eviction reservation is held. Skip the
map write → release has nothing to release → the reservation is held forever →
tombstones can never be purged → the near map grows unbounded (the test caps
delete history at 4 and does 100 put+remove: healthy code keeps the map at 4,
without the map write all 100 stay).
So the structure is not about the eviction policy — it is about
`markObsolete`, the generic removal mechanism, which caches without any policy
rely on too.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]