ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: Ignite-950 - Fixing tests - store may modify the passed in collection.
Date Tue, 27 Oct 2015 09:02:49 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-950-new 97a8c1c1a -> 58120e16d


Ignite-950 - Fixing tests - store may modify the passed in collection.


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

Branch: refs/heads/ignite-950-new
Commit: 58120e16dff99adee1fc57957d9d5226ce7f4e4c
Parents: 97a8c1c
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Tue Oct 27 12:02:39 2015 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Tue Oct 27 12:02:39 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheEventManager.java         |  4 ++--
 .../cache/store/GridCacheStoreManagerAdapter.java       | 12 ++++--------
 2 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/58120e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java
index 138b33b..1f84e0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEventManager.java
@@ -265,9 +265,9 @@ public class GridCacheEventManager extends GridCacheManagerAdapter {
                 key == null ? null : key.value(cctx.cacheObjectContext(), false),
                 xid,
                 lockId,
-                newVal,
+                newVal == null ? null : newVal.value(cctx.cacheObjectContext(), false),
                 hasNewVal,
-                oldVal,
+                oldVal == null ? null : oldVal.value(cctx.cacheObjectContext(), false),
                 hasOldVal,
                 subjId,
                 cloClsName,

http://git-wip-us.apache.org/repos/asf/ignite/blob/58120e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
index ad010f7..b12ccf9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
@@ -671,11 +671,7 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
         }
 
         if (store != null) {
-            Collection<Object> keys0 = F.viewReadOnly(keys, new IgniteClosure() {
-                @Override public Object apply(Object o) {
-                    return cctx.unwrapPortableIfNeeded(o, !convertPortable());
-                }
-            });
+            Collection<Object> keys0 = cctx.unwrapPortablesIfNeeded(keys, !convertPortable());
 
             if (log.isDebugEnabled())
                 log.debug("Removing values from cache store [keys=" + keys0 + ']');
@@ -1082,14 +1078,14 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
 
                         Object k = e.getKey();
 
-                        if (rmvd != null && rmvd.contains(k))
-                            continue;
-
                         Object v = locStore ? e.getValue() : e.getValue().get1();
 
                         k = cctx.unwrapPortableIfNeeded(k, !convertPortable());
                         v = cctx.unwrapPortableIfNeeded(v, !convertPortable());
 
+                        if (rmvd != null && rmvd.contains(k))
+                            continue;
+
                         next = new CacheEntryImpl<>(k, v);
 
                         break;


Mime
View raw message