ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-51
Date Fri, 06 Mar 2015 06:53:27 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-51 dadcf92f4 -> 31f2c0de2


# 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/31f2c0de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/31f2c0de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/31f2c0de

Branch: refs/heads/ignite-51
Commit: 31f2c0de29c9e7bdad0d940ae0d9983fb0b20d97
Parents: dadcf92
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Mar 6 09:51:55 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Mar 6 09:51:55 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java     | 38 +++++++++-----------
 .../IgniteCacheObjectProcessorAdapter.java      |  2 ++
 2 files changed, 19 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/31f2c0de/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 2cd0645..2d94ac3 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
@@ -211,8 +211,9 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
                 if (cctx.kernalContext().config().isPeerClassLoadingEnabled()) {
                     Object val0 = null;
 
-                    if (val != null) {
-                        val0 = val.value(cctx.cacheObjectContext(), false);
+                    if (val != null && val.type() != CacheObjectAdapter.TYPE_BYTE_ARR)
{
+                        val0 = cctx.portable().unmarshal(cctx.cacheObjectContext(),
+                            val.valueBytes(cctx.cacheObjectContext()), cctx.deploy().globalLoader());
 
                         if (val0 != null)
                             cctx.gridDeploy().deploy(val0.getClass(), val0.getClass().getClassLoader());
@@ -386,32 +387,27 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
 
         long time = U.currentTimeMillis();
 
-        try {
-            synchronized (this) {
-                if (!obsolete()) {
-                    info = new GridCacheEntryInfo();
+        synchronized (this) {
+            if (!obsolete()) {
+                info = new GridCacheEntryInfo();
 
-                    info.key(key);
-                    info.cacheId(cctx.cacheId());
+                info.key(key);
+                info.cacheId(cctx.cacheId());
 
-                    long expireTime = expireTimeExtras();
+                long expireTime = expireTimeExtras();
 
-                    boolean expired = expireTime != 0 && expireTime <= time;
+                boolean expired = expireTime != 0 && expireTime <= time;
 
-                    info.ttl(ttlExtras());
-                    info.expireTime(expireTime);
-                    info.version(ver);
-                    info.setNew(isStartVersion());
-                    info.setDeleted(deletedUnlocked());
+                info.ttl(ttlExtras());
+                info.expireTime(expireTime);
+                info.version(ver);
+                info.setNew(isStartVersion());
+                info.setDeleted(deletedUnlocked());
 
-                    if (!expired)
-                        info.value(valueBytesUnlocked());
-                }
+                if (!expired)
+                    info.value(valueBytesUnlocked());
             }
         }
-        catch (Exception e) {
-            throw new IgniteException("Failed to unmarshal object while creating entry info:
" + this, e);
-        }
 
         return info;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/31f2c0de/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/IgniteCacheObjectProcessorAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/IgniteCacheObjectProcessorAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/IgniteCacheObjectProcessorAdapter.java
index 6e65c2f..60eac93 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/IgniteCacheObjectProcessorAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/IgniteCacheObjectProcessorAdapter.java
@@ -104,6 +104,8 @@ public abstract class IgniteCacheObjectProcessorAdapter extends GridProcessorAda
     @Override public CacheObject toCacheObject(GridCacheContext ctx, long valPtr, boolean
tmp)
         throws IgniteCheckedException
     {
+        assert valPtr != 0;
+
         long ptr = valPtr;
 
         int size = UNSAFE.getInt(ptr);


Mime
View raw message