diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java index da6f47073df88..2dfe61e0ba565 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java @@ -2395,7 +2395,14 @@ private boolean checkExpired() throws IgniteCheckedException { long delta = expireTime - U.currentTimeMillis(); if (delta <= 0) { - removeValue(); + cctx.shared().database().checkpointReadLock(); + + try { + removeValue(); + } + finally { + cctx.shared().database().checkpointReadUnlock(); + } return true; } @@ -3535,8 +3542,15 @@ protected WALPointer logTxUpdate( protected void removeValue() throws IgniteCheckedException { assert lock.isHeldByCurrentThread(); - // Removals are possible from RENTING partition on clearing/evicting. - cctx.offheap().remove(cctx, key, partition(), localPartition()); + cctx.shared().database().checkpointReadLock(); + + try { + // Removals are possible from RENTING partition on clearing/evicting. + cctx.offheap().remove(cctx, key, partition(), localPartition()); + } + finally { + cctx.shared().database().checkpointReadUnlock(); + } } /** {@inheritDoc} */