ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-5075
Date Wed, 31 May 2017 09:02:27 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075 08ed6da98 -> 6250119ef


ignite-5075


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6250119e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6250119e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6250119e

Branch: refs/heads/ignite-5075
Commit: 6250119efd2be9216b8e478f4aa5e4fcd43915b0
Parents: 08ed6da
Author: sboikov <sboikov@gridgain.com>
Authored: Wed May 31 12:02:21 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed May 31 12:02:21 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheOffheapEvictionManager.java    | 11 +++--------
 .../processors/cache/GridCacheConcurrentMapImpl.java     |  2 +-
 2 files changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6250119e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
index f8e9f32..d737c8b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
@@ -41,15 +41,10 @@ public class CacheOffheapEvictionManager extends GridCacheManagerAdapter
impleme
             return;
 
         try {
-            if (e.markObsoleteIfEmpty(null) || e.obsolete()) {
-                e.context().cache().removeEntry(e);
+            boolean evicted = e.evictInternal(GridCacheVersionManager.EVICT_VER, null, false)
+                || e.markObsoleteIfEmpty(null);
 
-                return;
-            }
-
-            boolean evicted = e.evictInternal(GridCacheVersionManager.EVICT_VER, null, false);
-
-            if (evicted)
+            if (evicted && !e.isDht()) // GridDhtCacheEntry removes entry when obsoleted.
                 cctx.cache().removeEntry(e);
         }
         catch (IgniteCheckedException ex) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6250119e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
index 97dc3a9..cd2d812 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
@@ -248,7 +248,7 @@ public abstract class GridCacheConcurrentMapImpl implements GridCacheConcurrentM
 
         CacheMapHolder hld = entriesMap(ctx.cacheIdBoxed(), false);
 
-        boolean rmv = hld != null ? hld.map.remove(entry.key(), entry) : null;
+        boolean rmv = hld != null && hld.map.remove(entry.key(), entry);
 
         if (rmv) {
             if (ctx.events().isRecordable(EVT_CACHE_ENTRY_DESTROYED)) {


Mime
View raw message