Repository: ignite
Updated Branches:
  refs/heads/ignite-5075 9f2313ecb -> 1c8fb3a58


ignite-5075


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

Branch: refs/heads/ignite-5075
Commit: 1c8fb3a589474e84344c61b2a225354e33ab73d9
Parents: 9f2313e
Author: sboikov <sboi...@gridgain.com>
Authored: Thu May 18 15:52:14 2017 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Thu May 18 15:52:14 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheConcurrentMapImpl.java   | 13 +++++--------
 .../dht/preloader/GridDhtForceKeysFuture.java          |  2 +-
 2 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1c8fb3a5/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 1faa596..de69d9c 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
@@ -67,13 +67,7 @@ public abstract class GridCacheConcurrentMapImpl implements 
GridCacheConcurrentM
         KeyCacheObject key,
         final boolean create,
         final boolean touch) {
-        ConcurrentMap<KeyCacheObject, GridCacheMapEntry> map = 
entriesMap(ctx.cacheId(), create);
-
-        if (map == null) {
-            assert !create;
-
-            return null;
-        }
+        ConcurrentMap<KeyCacheObject, GridCacheMapEntry> map = 
entriesMap(ctx.cacheId(), false);
 
         GridCacheMapEntry cur = null;
         GridCacheMapEntry created = null;
@@ -86,7 +80,7 @@ public abstract class GridCacheConcurrentMapImpl implements 
GridCacheConcurrentM
 
         try {
             while (!done) {
-                GridCacheMapEntry entry = map.get(key);
+                GridCacheMapEntry entry = map != null ? map.get(key) : null;
                 created = null;
                 doomed = null;
 
@@ -100,6 +94,9 @@ public abstract class GridCacheConcurrentMapImpl implements 
GridCacheConcurrentM
                                 reserved = true;
                             }
 
+                            if (map == null)
+                                map = entriesMap(ctx.cacheId(), true);
+
                             created0 = factory.create(ctx, topVer, key);
                         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1c8fb3a5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
index 6bc2c77..a5a1eb3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
@@ -117,7 +117,7 @@ public final class GridDhtForceKeysFuture<K, V> extends 
GridCompoundFuture<Objec
     ) {
         assert topVer.topologyVersion() != 0 : topVer;
         assert !F.isEmpty(keys) : keys;
-        assert cctx.isDht();
+        assert !cctx.isNear();
 
         this.cctx = cctx;
         this.keys = keys;

Reply via email to