ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [05/50] [abbrv] incubator-ignite git commit: # ignite-51
Date Wed, 11 Mar 2015 11:07:37 GMT
# ignite-51


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

Branch: refs/heads/ignite-368
Commit: f86bbe8b90d5324d7c17bd231003050414aa66e7
Parents: 20b9019
Author: sboikov <semen.boikov@inria.fr>
Authored: Fri Mar 6 22:08:40 2015 +0300
Committer: sboikov <semen.boikov@inria.fr>
Committed: Fri Mar 6 22:18:36 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java     |  3 +-
 .../processors/cache/GridCacheSwapManager.java  | 35 ++++++++++++++------
 .../dht/GridDhtTransactionalCacheAdapter.java   |  2 ++
 .../dht/GridCacheAtomicNearCacheSelfTest.java   |  8 +++--
 4 files changed, 33 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f86bbe8b/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 b20504b..8ef0f99 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
@@ -800,8 +800,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
 
             Object storeVal = readThrough(tx0, key, false, subjId, taskName);
 
-            if (storeVal != null)
-                ret = cctx.toCacheObject(storeVal);
+            ret = cctx.toCacheObject(storeVal);
 
             loadedFromStore = true;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f86bbe8b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 1e8e663..7f65e0e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -547,8 +547,11 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
 
                 GridCacheQueryManager qryMgr = cctx.queries();
 
-                if (qryMgr != null)
-                    qryMgr.onUnswap(key, entry.value(), entry.valueBytes());
+                if (qryMgr != null) {
+                    qryMgr.onUnswap(key.value(cctx.cacheObjectContext(), false),
+                            entry.value().value(cctx.cacheObjectContext(), false),
+                            entry.valueBytes());
+                }
 
                 return entry;
             }
@@ -612,8 +615,11 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
 
                         GridCacheQueryManager qryMgr = cctx.queries();
 
-                        if (qryMgr != null)
-                            qryMgr.onUnswap(key, v, valBytes);
+                        if (qryMgr != null) {
+                            qryMgr.onUnswap(key.value(cctx.cacheObjectContext(), false),
+                                    v.value(cctx.cacheObjectContext(), false),
+                                    valBytes);
+                        }
                     }
                     catch (IgniteCheckedException e) {
                         err.set(e);
@@ -748,7 +754,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
                                 EVT_CACHE_OBJECT_FROM_OFFHEAP, null, false, null, true, null,
null, null);
 
                         if (qryMgr != null)
-                            qryMgr.onUnswap(key, entry.value(), entry.valueBytes());
+                            qryMgr.onUnswap(key.value(cctx.cacheObjectContext(), false),
+                                    entry.value().value(cctx.cacheObjectContext(), false),
+                                    entry.valueBytes());
 
                         GridCacheBatchSwapEntry unswapped = new GridCacheBatchSwapEntry(key,
                             part,
@@ -847,8 +855,11 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
                             // Always fire this event, since preloading depends on it.
                             onUnswapped(swapKey.partition(), key, entry);
 
-                            if (qryMgr != null)
-                                qryMgr.onUnswap(key, entry.value(), entry.valueBytes());
+                            if (qryMgr != null) {
+                                qryMgr.onUnswap(key.value(cctx.cacheObjectContext(), false),
+                                        entry.value().value(cctx.cacheObjectContext(), false),
+                                        entry.valueBytes());
+                            }
                         }
                         catch (IgniteCheckedException e) {
                             err.set(e);
@@ -926,7 +937,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
                     if (entry == null)
                         return;
 
-                    qryMgr.onUnswap(key, entry.value(), entry.valueBytes());
+                    qryMgr.onUnswap(key.value(cctx.cacheObjectContext(), false),
+                            entry.value().value(cctx.cacheObjectContext(), false),
+                            entry.valueBytes());
                 }
                 catch (IgniteCheckedException e) {
                     throw new IgniteException(e);
@@ -1013,7 +1026,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
         GridCacheQueryManager qryMgr = cctx.queries();
 
         if (qryMgr != null)
-            qryMgr.onSwap(spaceName, key);
+            qryMgr.onSwap(spaceName, key.value(cctx.cacheObjectContext(), false));
     }
 
     /**
@@ -1042,7 +1055,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
                         (IgniteUuid)null, null, EVT_CACHE_OBJECT_TO_OFFHEAP, null, false,
null, true, null, null, null);
 
                 if (qryMgr != null)
-                    qryMgr.onSwap(spaceName, swapEntry.key());
+                    qryMgr.onSwap(spaceName, swapEntry.key().value(cctx.cacheObjectContext(),
false));
             }
         }
         else {
@@ -1064,7 +1077,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
                         (IgniteUuid)null, null, EVT_CACHE_OBJECT_SWAPPED, null, false, null,
true, null, null, null);
 
                     if (qryMgr != null)
-                        qryMgr.onSwap(spaceName, batchSwapEntry.key());
+                        qryMgr.onSwap(spaceName, batchSwapEntry.key().value(cctx.cacheObjectContext(),
false));
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f86bbe8b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index b394d49..e367588 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -1021,6 +1021,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
                                         filterPassed = writeEntry.filtersPassed();
                                     }
 
+                                    if (ret && val == null)
+                                        val = e.valueBytes(null);
 
                                     // We include values into response since they are required
for local
                                     // calls and won't be serialized. We are also including
DHT version.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f86bbe8b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
index af1289a..15f0ae9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
@@ -702,7 +702,9 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest
{
         if (expectNear) {
             assertNotNull("No near entry for: " + key + ", grid: " + ignite.name(), nearEntry);
 
-            assertEquals("Unexpected value for grid: " + ignite.name(), val, nearEntry.info().value());
+            assertEquals("Unexpected value for grid: " + ignite.name(),
+                val,
+                CU.value(nearEntry.info().value(), near.context(), false));
         }
         else
             assertNull("Unexpected near entry: " + nearEntry + ", grid: " + ignite.name(),
nearEntry);
@@ -723,7 +725,9 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest
{
             for (UUID reader : expReaders)
                 assertTrue(readers.contains(reader));
 
-            assertEquals("Unexpected value for grid: " + ignite.name(), val, dhtEntry.info().value());
+            assertEquals("Unexpected value for grid: " + ignite.name(),
+                val,
+                CU.value(dhtEntry.info().value(), dht.context(), false));
         }
         else
             assertNull("Unexpected dht entry: " + dhtEntry + ", grid: " + ignite.name(),
dhtEntry);


Mime
View raw message