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-4932 WIP
Date Tue, 11 Apr 2017 16:55:12 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4932 980b95f99 -> f9f4256ae


ignite-4932 WIP


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

Branch: refs/heads/ignite-4932
Commit: f9f4256aed1fee2b7969b03036b8383285a639ee
Parents: 980b95f
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Apr 11 19:55:06 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Apr 11 19:55:06 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |  49 ++++---
 .../cache/GridCacheConcurrentMap.java           |   2 -
 .../cache/GridCacheConcurrentMapImpl.java       |   6 +-
 .../processors/cache/GridCacheMapEntry.java     |  65 +++++++---
 .../cache/GridCacheMapEntryFactory.java         |   4 +-
 .../processors/cache/GridNoStorageCacheMap.java |   6 +-
 .../distributed/GridDistributedCacheEntry.java  |   6 +-
 .../dht/GridCachePartitionedConcurrentMap.java  |   4 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   9 +-
 .../distributed/dht/GridDhtCacheEntry.java      |   6 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   4 +-
 .../dht/GridDhtOffHeapCacheEntry.java           |   6 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   7 +-
 .../dht/atomic/GridDhtAtomicCacheEntry.java     |   6 +-
 .../atomic/GridDhtAtomicOffHeapCacheEntry.java  |   6 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   7 +-
 .../colocated/GridDhtColocatedCacheEntry.java   |   6 +-
 .../GridDhtColocatedOffHeapCacheEntry.java      |   6 +-
 .../colocated/GridDhtDetachedCacheEntry.java    |   8 +-
 .../distributed/near/GridNearCacheAdapter.java  |   7 +-
 .../distributed/near/GridNearCacheEntry.java    |   6 +-
 .../near/GridNearOffHeapCacheEntry.java         |   6 +-
 .../processors/cache/local/GridLocalCache.java  |   5 +-
 .../cache/local/GridLocalCacheEntry.java        |   6 +-
 .../transactions/IgniteTxLocalAdapter.java      |   6 +-
 .../cache/IgniteCacheNoSyncForGetTest.java      | 127 ++++++++++++-------
 .../loadtests/hashmap/GridHashMapLoadTest.java  |   3 +-
 27 files changed, 217 insertions(+), 162 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 8c3c5d1..27a5750 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -973,8 +973,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
             cur = map.putEntryIfObsoleteOrAbsent(
                 topVer,
                 key,
-                null,
-                create, touch);
+                create,
+                touch);
         }
 
         return cur;
@@ -1947,19 +1947,38 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                                 }
                             }
                             else {
-                                res = entry.innerGetVersioned(
-                                    null,
-                                    null,
-                                    ctx.isSwapOrOffheapEnabled(),
-                                    /*unmarshal*/true,
-                                    updateMetrics,
-                                    evt,
-                                    subjId,
-                                    null,
-                                    taskName,
-                                    expiry,
-                                    !deserializeBinary,
-                                    readerArgs);
+                                if (needVer || readerArgs != null) {
+                                    res = entry.innerGetVersioned(
+                                        null,
+                                        null,
+                                        ctx.isSwapOrOffheapEnabled(),
+                                       /*unmarshal*/true,
+                                        updateMetrics,
+                                        evt,
+                                        subjId,
+                                        null,
+                                        taskName,
+                                        expiry,
+                                        !deserializeBinary,
+                                        readerArgs);
+                                }
+                                else {
+                                    CacheObject val = entry.innerGet(
+                                        null,
+                                        null,
+                                        ctx.isSwapOrOffheapEnabled(),
+                                        false,
+                                        updateMetrics,
+                                        evt,
+                                        false,
+                                        subjId,
+                                        null,
+                                        taskName,
+                                        expiry,
+                                        !deserializeBinary);
+
+                                    res = val != null ? new EntryGetResult(val, null) : null;
+                                }
 
                                 if (res == null)
                                     ctx.evicts().touch(entry, topVer);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
index e733114..0b6d5ab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
@@ -38,7 +38,6 @@ public interface GridCacheConcurrentMap {
     /**
      * @param topVer Topology version.
      * @param key Key.
-     * @param val Value.
      * @param create Create flag.
      * @return Triple where the first element is current entry associated with the key,
      *      the second is created entry and the third is doomed (all may be null).
@@ -46,7 +45,6 @@ public interface GridCacheConcurrentMap {
     @Nullable public GridCacheMapEntry putEntryIfObsoleteOrAbsent(
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        @Nullable CacheObject val,
         boolean create,
         boolean touch);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/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 48dae76..c91372d 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
@@ -110,7 +110,7 @@ public class GridCacheConcurrentMapImpl implements GridCacheConcurrentMap {
 
     /** {@inheritDoc} */
     @Nullable @Override public GridCacheMapEntry putEntryIfObsoleteOrAbsent(final AffinityTopologyVersion topVer,
-        KeyCacheObject key, @Nullable final CacheObject val, final boolean create, final boolean touch) {
+        KeyCacheObject key, final boolean create, final boolean touch) {
 
         GridCacheMapEntry cur = null;
         GridCacheMapEntry created = null;
@@ -127,7 +127,7 @@ public class GridCacheConcurrentMapImpl implements GridCacheConcurrentMap {
             if (entry == null) {
                 if (create) {
                     if (created0 == null)
-                        created0 = factory.create(ctx, topVer, key, key.hashCode(), val);
+                        created0 = factory.create(ctx, topVer, key, key.hashCode());
 
                     cur = created = created0;
 
@@ -142,7 +142,7 @@ public class GridCacheConcurrentMapImpl implements GridCacheConcurrentMap {
 
                     if (create) {
                         if (created0 == null)
-                            created0 = factory.create(ctx, topVer, key, key.hashCode(), val);
+                            created0 = factory.create(ctx, topVer, key, key.hashCode());
 
                         cur = created = created0;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/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 2237e22..34f8b96 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
@@ -172,13 +172,11 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
      * @param cctx Cache context.
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      */
     protected GridCacheMapEntry(
         GridCacheContext<?, ?> cctx,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
         if (log == null)
             log = U.logger(cctx.kernalContext(), logRef, GridCacheMapEntry.class);
@@ -191,12 +189,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         this.hash = hash;
         this.cctx = cctx;
 
-        val = cctx.kernalContext().cacheObjects().prepareForCache(val, cctx);
-
-        synchronized (this) {
-            value(val);
-        }
-
         ver = cctx.versions().next();
 
         startVer = ver.order();
@@ -379,16 +371,21 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public synchronized boolean isNewLocked() throws GridCacheEntryRemovedException {
-        checkObsolete();
+    @Override public boolean isNewLocked() throws GridCacheEntryRemovedException {
+        if (val != null)
+            return false;
 
-        return isStartVersion();
+        synchronized (this) {
+            checkObsolete();
+
+            return isStartVersion();
+        }
     }
 
     /**
      * @return {@code True} if start version.
      */
-    public boolean isStartVersion() {
+    private boolean isStartVersion() {
         return ver.nodeOrder() == cctx.localNode().order() && ver.order() == startVer;
     }
 
@@ -475,6 +472,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                     clearIndex(val);
                 }
+
+                value(null);
             }
             else {
                 obsolete = false;
@@ -875,6 +874,34 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
         Object res = null;
 
+        // TODO IGNITE-4932: metrics/events.
+
+        if (readerArgs == null && expiryPlc == null) {
+            if (!retVer && cctx.config().isEagerTtl()) { // Fast heap get.
+                CacheObject val0 = this.val;
+
+                if (val0 != null)
+                    return val0;
+            }
+
+            if (cctx.isSwapOrOffheapEnabled() && readSwap) {
+                GridCacheSwapEntry swapEntry = cctx.swap().read(this, false, true, true, false);
+
+                if (swapEntry != null) {
+                    long expireTime = swapEntry.expireTime();
+
+                    if (expireTime != 0) {
+                        if (expireTime - U.currentTimeMillis() > 0) {
+                            return retVer ? new EntryGetWithTtlResult(val, ver, false, expireTime, swapEntry.ttl()) :
+                                swapEntry.value();
+                        }
+                    }
+                    else
+                        return retVer ? new EntryGetResult(val, ver, false) : swapEntry.value();
+                }
+            }
+        }
+
         synchronized (this) {
             checkObsolete();
 
@@ -2917,6 +2944,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
     /** {@inheritDoc} */
     @Override public boolean markObsoleteIfEmpty(@Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException {
+        if (val != null)
+            return false;
+
         boolean obsolete = false;
         boolean deferred = false;
         GridCacheVersion ver0 = null;
@@ -3057,8 +3087,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public final synchronized boolean obsolete() {
-        return obsoleteVersionExtras() != null;
+    @Override public final boolean obsolete() {
+        if (val != null)
+            return false;
+
+        synchronized (this) {
+            return obsoleteVersionExtras() != null;
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntryFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntryFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntryFactory.java
index 4ee9385..0b49f79 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntryFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntryFactory.java
@@ -28,14 +28,12 @@ public interface GridCacheMapEntryFactory {
      * @param topVer Topology version.
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      * @return New cache entry.
      */
     public GridCacheMapEntry create(
         GridCacheContext ctx,
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     );
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
index 2532882..17bdfee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
@@ -46,11 +46,11 @@ public class GridNoStorageCacheMap implements GridCacheConcurrentMap {
 
     /** {@inheritDoc} */
     @Override public GridCacheMapEntry putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer, KeyCacheObject key,
-        @Nullable CacheObject val, boolean create, boolean touch) {
+        boolean create, boolean touch) {
         if (create)
             return ctx.useOffheapEntry() ?
-                new GridDhtOffHeapCacheEntry(ctx, topVer, key, key.hashCode(), val) :
-                new GridDhtCacheEntry(ctx, topVer, key, key.hashCode(), val);
+                new GridDhtOffHeapCacheEntry(ctx, topVer, key, key.hashCode()) :
+                new GridDhtCacheEntry(ctx, topVer, key, key.hashCode());
         else
             return null;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
index f518934..28cd202 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
@@ -50,15 +50,13 @@ public class GridDistributedCacheEntry extends GridCacheMapEntry {
      * @param ctx Cache context.
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      */
     public GridDistributedCacheEntry(
         GridCacheContext ctx,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, key, hash, val);
+        super(ctx, key, hash);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedConcurrentMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedConcurrentMap.java
index cfbe9bb..d59bf2d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedConcurrentMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedConcurrentMap.java
@@ -80,13 +80,13 @@ public class GridCachePartitionedConcurrentMap implements GridCacheConcurrentMap
 
     /** {@inheritDoc} */
     @Override public GridCacheMapEntry putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer, KeyCacheObject key,
-        @Nullable CacheObject val, boolean create, boolean touch) {
+        boolean create, boolean touch) {
         GridDhtLocalPartition part = localPartition(key, topVer, create);
 
         if (part == null)
             return null;
 
-        return part.putEntryIfObsoleteOrAbsent(topVer, key, val, create, touch);
+        return part.putEntryIfObsoleteOrAbsent(topVer, key, create, touch);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index a8cc599..f893286 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -247,13 +247,12 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
                 GridCacheContext ctx,
                 AffinityTopologyVersion topVer,
                 KeyCacheObject key,
-                int hash,
-                CacheObject val
+                int hash
             ) {
                 if (ctx.useOffheapEntry())
-                    return new GridDhtOffHeapCacheEntry(ctx, topVer, key, hash, val);
+                    return new GridDhtOffHeapCacheEntry(ctx, topVer, key, hash);
 
-                return new GridDhtCacheEntry(ctx, topVer, key, hash, val);
+                return new GridDhtCacheEntry(ctx, topVer, key, hash);
             }
         };
     }
@@ -441,7 +440,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
      * @return Cache entry.
      */
     protected GridDistributedCacheEntry createEntry(KeyCacheObject key) {
-        return new GridDhtDetachedCacheEntry(ctx, key, key.hashCode(), null, null, 0);
+        return new GridDhtDetachedCacheEntry(ctx, key, key.hashCode());
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index 39571ff..4472050 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -77,16 +77,14 @@ public class GridDhtCacheEntry extends GridDistributedCacheEntry {
      * @param topVer Topology version at the time of creation (if negative, then latest topology is assumed).
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      */
     public GridDhtCacheEntry(
         GridCacheContext ctx,
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, key, hash, val);
+        super(ctx, key, hash);
 
         // Record this entry with partition.
         int p = cctx.affinity().partition(key);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 9f8498a..4475d48 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -281,8 +281,8 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
     /** {@inheritDoc} */
     @Override public GridCacheMapEntry putEntryIfObsoleteOrAbsent(
         AffinityTopologyVersion topVer, KeyCacheObject key,
-        @Nullable CacheObject val, boolean create, boolean touch) {
-        return map.putEntryIfObsoleteOrAbsent(topVer, key, val, create, touch);
+        boolean create, boolean touch) {
+        return map.putEntryIfObsoleteOrAbsent(topVer, key, create, touch);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
index 75ee45c..043b78f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
@@ -35,16 +35,14 @@ public class GridDhtOffHeapCacheEntry extends GridDhtCacheEntry {
      * @param topVer Topology version at the time of creation (if negative, then latest topology is assumed).
      * @param key    Cache key.
      * @param hash   Key hash value.
-     * @param val    Entry value.
      */
     public GridDhtOffHeapCacheEntry(
         GridCacheContext ctx,
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, topVer, key, hash, val);
+        super(ctx, topVer, key, hash);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 4159359..8523366 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -195,13 +195,12 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                 GridCacheContext ctx,
                 AffinityTopologyVersion topVer,
                 KeyCacheObject key,
-                int hash,
-                CacheObject val
+                int hash
             ) {
                 if (ctx.useOffheapEntry())
-                    return new GridDhtAtomicOffHeapCacheEntry(ctx, topVer, key, hash, val);
+                    return new GridDhtAtomicOffHeapCacheEntry(ctx, topVer, key, hash);
 
-                return new GridDhtAtomicCacheEntry(ctx, topVer, key, hash, val);
+                return new GridDhtAtomicCacheEntry(ctx, topVer, key, hash);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCacheEntry.java
index 3f014d5..15278d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCacheEntry.java
@@ -34,16 +34,14 @@ public class GridDhtAtomicCacheEntry extends GridDhtCacheEntry {
      * @param topVer Topology version at the time of creation (if negative, then latest topology is assumed).
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      */
     public GridDhtAtomicCacheEntry(
         GridCacheContext ctx,
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, topVer, key, hash, val);
+        super(ctx, topVer, key, hash);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
index c86d477..d00493d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
@@ -35,16 +35,14 @@ public class GridDhtAtomicOffHeapCacheEntry extends GridDhtAtomicCacheEntry {
      * @param topVer Topology version at the time of creation (if negative, then latest topology is assumed).
      * @param key    Cache key.
      * @param hash   Key hash value.
-     * @param val    Entry value.
      */
     public GridDhtAtomicOffHeapCacheEntry(
         GridCacheContext ctx,
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, topVer, key, hash, val);
+        super(ctx, topVer, key, hash);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index e1e0ec2..c8556e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -123,13 +123,12 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
                 GridCacheContext ctx,
                 AffinityTopologyVersion topVer,
                 KeyCacheObject key,
-                int hash,
-                CacheObject val
+                int hash
             ) {
                 if (ctx.useOffheapEntry())
-                    return new GridDhtColocatedOffHeapCacheEntry(ctx, topVer, key, hash, val);
+                    return new GridDhtColocatedOffHeapCacheEntry(ctx, topVer, key, hash);
 
-                return new GridDhtColocatedCacheEntry(ctx, topVer, key, hash, val);
+                return new GridDhtColocatedCacheEntry(ctx, topVer, key, hash);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCacheEntry.java
index cc71e11..db837a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCacheEntry.java
@@ -33,16 +33,14 @@ public class GridDhtColocatedCacheEntry extends GridDhtCacheEntry {
      * @param topVer Topology version at the time of creation (if negative, then latest topology is assumed).
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      */
     public GridDhtColocatedCacheEntry(
         GridCacheContext ctx,
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, topVer, key, hash, val);
+        super(ctx, topVer, key, hash);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
index 8080ca3..a6869d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
@@ -35,16 +35,14 @@ public class GridDhtColocatedOffHeapCacheEntry extends GridDhtColocatedCacheEntr
      * @param topVer Topology version at the time of creation (if negative, then latest topology is assumed).
      * @param key    Cache key.
      * @param hash   Key hash value.
-     * @param val    Entry value.
      */
     public GridDhtColocatedOffHeapCacheEntry(
         GridCacheContext ctx,
         AffinityTopologyVersion topVer,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, topVer, key, hash, val);
+        super(ctx, topVer, key, hash);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
index 2e05560..3ae57f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
@@ -35,13 +35,9 @@ public class GridDhtDetachedCacheEntry extends GridDistributedCacheEntry {
      * @param ctx Cache context.
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
-     * @param next Next entry in the linked list.
-     * @param hdrId Header ID.
      */
-    public GridDhtDetachedCacheEntry(GridCacheContext ctx, KeyCacheObject key, int hash, CacheObject val,
-        GridCacheMapEntry next, int hdrId) {
-        super(ctx, key, hash, val);
+    public GridDhtDetachedCacheEntry(GridCacheContext ctx, KeyCacheObject key, int hash) {
+        super(ctx, key, hash);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 4ddad74..8cefe0c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -96,15 +96,14 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
                 GridCacheContext ctx,
                 AffinityTopologyVersion topVer,
                 KeyCacheObject key,
-                int hash,
-                CacheObject val
+                int hash
             ) {
                 // Can't hold any locks here - this method is invoked when
                 // holding write-lock on the whole cache map.
                 if (ctx.useOffheapEntry())
-                    return new GridNearOffHeapCacheEntry(ctx, key, hash, val);
+                    return new GridNearOffHeapCacheEntry(ctx, key, hash);
 
-                return new GridNearCacheEntry(ctx, key, hash, val);
+                return new GridNearCacheEntry(ctx, key, hash);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
index d022805..5d44943 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
@@ -65,15 +65,13 @@ public class GridNearCacheEntry extends GridDistributedCacheEntry {
      * @param ctx Cache context.
      * @param key Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      */
     public GridNearCacheEntry(
         GridCacheContext ctx,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, key, hash, val);
+        super(ctx, key, hash);
 
         part = ctx.affinity().partition(key);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffHeapCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffHeapCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffHeapCacheEntry.java
index 1558f4c..f48256d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffHeapCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffHeapCacheEntry.java
@@ -32,15 +32,13 @@ public class GridNearOffHeapCacheEntry extends GridNearCacheEntry {
      * @param ctx   Cache context.
      * @param key   Cache key.
      * @param hash  Key hash value.
-     * @param val   Entry value.
      */
     public GridNearOffHeapCacheEntry(
         GridCacheContext ctx,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, key, hash, val);
+        super(ctx, key, hash);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
index 5b44d75..e88742c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCache.java
@@ -86,10 +86,9 @@ public class GridLocalCache<K, V> extends GridCacheAdapter<K, V> {
                 GridCacheContext ctx,
                 AffinityTopologyVersion topVer,
                 KeyCacheObject key,
-                int hash,
-                CacheObject val
+                int hash
             ) {
-                return new GridLocalCacheEntry(ctx, key, hash, val);
+                return new GridLocalCacheEntry(ctx, key, hash);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCacheEntry.java
index bc61333..6572672 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalCacheEntry.java
@@ -42,15 +42,13 @@ public class GridLocalCacheEntry extends GridCacheMapEntry {
      * @param ctx  Cache registry.
      * @param key  Cache key.
      * @param hash Key hash value.
-     * @param val Entry value.
      */
     GridLocalCacheEntry(
         GridCacheContext ctx,
         KeyCacheObject key,
-        int hash,
-        CacheObject val
+        int hash
     ) {
-        super(ctx, key, hash, val);
+        super(ctx, key, hash);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index bd806aa..88fbc1d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -2678,11 +2678,11 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
      */
     private boolean isAll(GridCacheContext cctx,
         KeyCacheObject key,
-        CacheObject val,
+        final CacheObject val,
         CacheEntryPredicate[] filter) {
-        GridCacheEntryEx e = new GridDhtDetachedCacheEntry(cctx, key, 0, val, null, 0) {
+        GridCacheEntryEx e = new GridDhtDetachedCacheEntry(cctx, key, 0) {
             @Nullable @Override public CacheObject peekVisibleValue() {
-                return rawGet();
+                return val;
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java
index b3470bc..faa63b3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java
@@ -26,6 +26,7 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryProcessor;
+import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -40,6 +41,7 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 
 /**
@@ -70,90 +72,123 @@ public class IgniteCacheNoSyncForGetTest extends GridCommonAbstractTest {
     }
 
     /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        startGrid(0);
+
+        client = true;
+
+        startGrid(1);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
         stopAllGrids();
 
-        super.afterTest();
+        super.afterTestsStopped();
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAtomicGet() throws Exception {
-        Ignite srv = startGrid(0);
+        doGet(ATOMIC, ONHEAP_TIERED);
+    }
 
-        client = true;
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAtomicGetOffheap() throws Exception {
+        doGet(ATOMIC, OFFHEAP_TIERED);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void doGet(CacheAtomicityMode atomicityMode, CacheMemoryMode memoryMode) throws Exception {
+        Ignite srv = ignite(0);
 
-        Ignite client = startGrid(1);
+        Ignite client = ignite(1);
 
-        final IgniteCache cache = client.createCache(cacheConfiguration());
+        final IgniteCache cache = client.createCache(cacheConfiguration(atomicityMode, memoryMode));
 
-        cache.put(1, 1);
+        try {
+            // Get from compute closure.
+            {
+                cache.put(1, 1);
 
-        {
-            hangLatch = new CountDownLatch(1);
-            processorStartLatch = new CountDownLatch(1);
+                hangLatch = new CountDownLatch(1);
+                processorStartLatch = new CountDownLatch(1);
 
-            IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    cache.invoke(1, new HangEntryProcessor());
+                IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable<Void>() {
+                    @Override public Void call() throws Exception {
+                        cache.invoke(1, new HangEntryProcessor());
 
-                    return null;
-                }
-            });
+                        return null;
+                    }
+                });
 
-            try {
-                boolean wait = processorStartLatch.await(30, TimeUnit.SECONDS);
+                try {
+                    boolean wait = processorStartLatch.await(30, TimeUnit.SECONDS);
 
-                assertTrue(wait);
+                    assertTrue(wait);
 
-                assertEquals(1, client.compute().affinityCall(cache.getName(), 1, new GetClosure(1, cache.getName())));
+                    assertEquals(1, client.compute().affinityCall(cache.getName(), 1, new GetClosure(1, cache.getName())));
 
-                hangLatch.countDown();
+                    hangLatch.countDown();
 
-                fut.get();
-            }
-            finally {
-                hangLatch.countDown();
+                    fut.get();
+                }
+                finally {
+                    hangLatch.countDown();
+                }
             }
-        }
 
-        {
-            hangLatch = new CountDownLatch(1);
-            processorStartLatch = new CountDownLatch(1);
+            // Local get.
+            {
+                cache.put(1, 1);
 
-            IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    cache.invoke(1, new HangEntryProcessor());
+                hangLatch = new CountDownLatch(1);
+                processorStartLatch = new CountDownLatch(1);
 
-                    return null;
-                }
-            });
+                IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable<Void>() {
+                    @Override public Void call() throws Exception {
+                        cache.invoke(1, new HangEntryProcessor());
 
-            try {
-                boolean wait = processorStartLatch.await(30, TimeUnit.SECONDS);
+                        return null;
+                    }
+                });
 
-                assertTrue(wait);
+                try {
+                    boolean wait = processorStartLatch.await(30, TimeUnit.SECONDS);
 
-                assertEquals(1, srv.cache(cache.getName()).get(1));
+                    assertTrue(wait);
 
-                hangLatch.countDown();
+                    assertEquals(1, srv.cache(cache.getName()).get(1));
 
-                fut.get();
-            }
-            finally {
-                hangLatch.countDown();
+                    hangLatch.countDown();
+
+                    fut.get();
+                }
+                finally {
+                    hangLatch.countDown();
+                }
             }
         }
+        finally {
+            client.destroyCache(cache.getName());
+        }
     }
 
     /**
      * @return Cache configuration.
      */
-    private CacheConfiguration cacheConfiguration() {
+    private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode, CacheMemoryMode memoryMode) {
         CacheConfiguration ccfg = new CacheConfiguration();
 
-        ccfg.setAtomicityMode(ATOMIC);
+        ccfg.setAtomicityMode(atomicityMode);
+        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setName("testCache");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9f4256a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
index 5c12f84..0e8d66b 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
@@ -79,10 +79,9 @@ public class GridHashMapLoadTest extends GridCommonAbstractTest {
 
         while (true) {
             Integer key = i++;
-            Integer val = i++;
 
             map.put(key, new GridCacheMapEntry(ctx, ctx.toCacheKeyObject(key),
-                key.hashCode(), ctx.toCacheObject(val)) {
+                key.hashCode()) {
                 @Override public boolean tmLock(IgniteInternalTx tx,
                     long timeout,
                     @Nullable GridCacheVersion serOrder,


Mime
View raw message