Repository: ignite
Updated Branches:
  refs/heads/ignite-1607-read f6d9274c3 -> 0c8d9f4ff


ignite-1607 WIP


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

Branch: refs/heads/ignite-1607-read
Commit: 0c8d9f4ff4500d449fded880352755841634e97a
Parents: f6d9274
Author: sboikov <[email protected]>
Authored: Fri Oct 9 14:09:22 2015 +0300
Committer: sboikov <[email protected]>
Committed: Fri Oct 9 14:09:22 2015 +0300

----------------------------------------------------------------------
 .../dht/CacheDistributedGetFutureAdapter.java   |  2 ++
 .../transactions/IgniteTxLocalAdapter.java      | 38 ++++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0c8d9f4f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java
index 5032f41..05f753c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/CacheDistributedGetFutureAdapter.java
@@ -159,6 +159,8 @@ public abstract class CacheDistributedGetFutureAdapter<K, 
V> extends GridCompoun
     @SuppressWarnings("unchecked")
     protected final void resultClosureValue(KeyCacheObject key, Object val, 
GridCacheVersion ver) {
         assert resC != null;
+        assert val != null;
+        assert !needVer || ver != null;
 
         ResultClosureReducer<K, V> rdc = (ResultClosureReducer)reducer();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0c8d9f4f/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 fb82ef6..c6fab8a 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
@@ -1647,9 +1647,6 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
         if (log.isDebugEnabled())
             log.debug("Loading missed values for missed map: " + missedMap);
 
-        final Collection<KeyCacheObject> loaded =
-            readCommitted() ? U.<KeyCacheObject>newHashSet(missedMap.size()) : 
null;
-
         final boolean needReadVer = optimistic() && serializable();
 
         return new GridEmbeddedFuture<>(
@@ -1706,13 +1703,15 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
                             cacheCtx.evicts().touch(e, topologyVersion());
 
                             if (visibleVal != null) {
-                                cacheCtx.addResult(map,
-                                    key,
-                                    visibleVal,
-                                    skipVals,
-                                    keepCacheObjects,
-                                    deserializePortable,
-                                    false);
+                                synchronized (map) {
+                                    cacheCtx.addResult(map,
+                                        key,
+                                        visibleVal,
+                                        skipVals,
+                                        keepCacheObjects,
+                                        deserializePortable,
+                                        false);
+                                }
                             }
                         }
                         else {
@@ -1727,18 +1726,17 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
                             }
 
                             if (visibleVal != null) {
-                                cacheCtx.addResult(map,
-                                    key,
-                                    visibleVal,
-                                    skipVals,
-                                    keepCacheObjects,
-                                    deserializePortable,
-                                    false);
+                                synchronized (map) {
+                                    cacheCtx.addResult(map,
+                                        key,
+                                        visibleVal,
+                                        skipVals,
+                                        keepCacheObjects,
+                                        deserializePortable,
+                                        false);
+                                }
                             }
                         }
-
-                        if (readCommitted())
-                            loaded.add(key);
                     }
                 })
         );

Reply via email to