ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/13] incubator-ignite git commit: # ignite-51 review
Date Thu, 05 Mar 2015 13:55:01 GMT
# ignite-51 review


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

Branch: refs/heads/ignite-51
Commit: 8d9724e89e2c49992259289adc672e328dbb7e98
Parents: 15e73b6
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Mar 5 14:58:05 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Mar 5 14:58:05 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheMapEntry.java   | 4 ++--
 .../processors/cache/transactions/IgniteTxLocalAdapter.java   | 7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8d9724e8/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 9c118cd..c4ffd0e 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
@@ -994,7 +994,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
             old = (retval || intercept) ? rawGetOrUnmarshalUnlocked(!retval) : this.val;
 
             if (intercept) {
-                val0 = CU.value(val, cctx, true);
+                val0 = CU.value(val, cctx, false);
 
                 CacheLazyEntry e = new CacheLazyEntry(cctx, key, old);
 
@@ -2053,7 +2053,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
             }
             else {
                 if (intercept) {
-                    interceptRes = cctx.config().getInterceptor().onBeforeRemove(new CacheLazyEntry(cctx,
key, key0, 
+                    interceptRes = cctx.config().getInterceptor().onBeforeRemove(new CacheLazyEntry(cctx,
key, key0,
                         oldVal, old0));
 
                     if (cctx.cancelRemove(interceptRes))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8d9724e8/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 92851cb..c56220c 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
@@ -577,7 +577,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
 
                             if (intercept) {
                                 IgniteBiTuple<Boolean, Object> t = cacheCtx.config().getInterceptor()
-                                    .onBeforeRemove(new CacheLazyEntry(cacheCtx, 
+                                    .onBeforeRemove(new CacheLazyEntry(cacheCtx,
                                         key,
                                         e.cached().rawGetOrUnmarshal(true)));
 
@@ -2462,7 +2462,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
     private void addInvokeResult(IgniteTxEntry txEntry, CacheObject cacheVal, GridCacheReturn<?>
ret) {
         GridCacheContext ctx = txEntry.context();
 
-        Object keyVal = txEntry.key().value(ctx.cacheObjectContext(), true);
+        Object keyVal = null;
         Object val = null;
 
         try {
@@ -2483,6 +2483,9 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                 ret.addEntryProcessResult(keyVal, new CacheInvokeResult<>(res));
         }
         catch (Exception e) {
+            if (keyVal == null)
+                keyVal = txEntry.key().value(ctx.cacheObjectContext(), true);
+
             ret.addEntryProcessResult(keyVal, new CacheInvokeResult(e));
         }
     }


Mime
View raw message