You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/06/04 11:36:21 UTC

[06/50] incubator-ignite git commit: # ignite-876

# ignite-876


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

Branch: refs/heads/ignite-gg-9621
Commit: 21b6a033e0f3dce5f9ea9949142eaee7d264edb4
Parents: 1dc248d
Author: sboikov <se...@inria.fr>
Authored: Mon Jun 1 21:25:26 2015 +0300
Committer: sboikov <se...@inria.fr>
Committed: Mon Jun 1 21:25:26 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java         | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/21b6a033/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
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 6aae7e9..4680994 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
@@ -3700,18 +3700,20 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
      * @param prevVal Previous value.
      * @throws IgniteCheckedException If failed.
      */
-    private void evictFailed(CacheObject prevVal) throws IgniteCheckedException {
+    private void evictFailed(@Nullable CacheObject prevVal) throws IgniteCheckedException {
         if (cctx.offheapTiered() && ((flags & IS_OFFHEAP_PTR_MASK) != 0)) {
-            cctx.swap().removeOffheap(key());
+            flags &= ~IS_OFFHEAP_PTR_MASK;
 
-            value(prevVal);
+            if (prevVal != null) {
+                cctx.swap().removeOffheap(key());
 
-            flags &= ~IS_OFFHEAP_PTR_MASK;
+                value(prevVal);
 
-            GridCacheQueryManager qryMgr = cctx.queries();
+                GridCacheQueryManager qryMgr = cctx.queries();
 
-            if (qryMgr != null)
-                qryMgr.onUnswap(key, prevVal);
+                if (qryMgr != null)
+                    qryMgr.onUnswap(key, prevVal);
+            }
         }
     }