ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1272 review
Date Wed, 14 Oct 2015 07:05:58 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1272 c2c61704a -> 344bf0cc8


ignite-1272 review


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

Branch: refs/heads/ignite-1272
Commit: 344bf0cc891fbf98b3f775b8dbf8d4e4e6bafba1
Parents: c2c6170
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Oct 14 10:05:37 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Oct 14 10:05:37 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/GridEventConsumeHandler.java    | 16 +++++++++-------
 .../internal/processors/cache/GridCacheMessage.java |  3 +--
 .../distributed/dht/GridDhtTxPrepareRequest.java    | 13 +++++--------
 .../cache/transactions/IgniteTxEntry.java           |  8 +++-----
 .../apache/ignite/marshaller/jdk/JdkMarshaller.java |  2 +-
 5 files changed, 19 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/344bf0cc/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
index 9896b9c..b4ce4ab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
@@ -198,16 +198,18 @@ class GridEventConsumeHandler implements GridContinuousHandler {
                                                     if (node == null)
                                                         continue;
 
-                                                    GridCacheContext cctx = ctx.cache().internalCache(
-                                                        cacheName).context();
+                                                    if (ctx.config().isPeerClassLoadingEnabled())
{
+                                                        GridCacheContext cctx =
+                                                            ctx.cache().internalCache(cacheName).context();
 
-                                                    if (cctx.deploymentEnabled() &&
-                                                        ctx.discovery().cacheNode(node, cacheName))
{
-                                                        wrapper.p2pMarshal(ctx.config().getMarshaller());
+                                                        if (cctx.deploymentEnabled() &&
+                                                            ctx.discovery().cacheNode(node,
cacheName)) {
+                                                            wrapper.p2pMarshal(ctx.config().getMarshaller());
 
-                                                        wrapper.cacheName = cacheName;
+                                                            wrapper.cacheName = cacheName;
 
-                                                        cctx.deploy().prepare(wrapper);
+                                                            cctx.deploy().prepare(wrapper);
+                                                        }
                                                     }
                                                 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/344bf0cc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
index 2e815fd..eb014d0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
@@ -357,10 +357,9 @@ public abstract class GridCacheMessage implements Message {
             for (IgniteTxEntry e : txEntries) {
                 e.marshal(ctx, transferExpiry);
 
-                GridCacheContext cctx = ctx.cacheContext(e.cacheId());
+                GridCacheContext cctx = e.context();
 
                 if (cctx.deploymentEnabled()) {
-
                     if (e.key() != null)
                         prepareObject(e.key().value(cctx.cacheObjectContext(), false), cctx);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/344bf0cc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index 4204753..12c0f3c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -284,16 +284,13 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest
{
 
             ownedVals = owned.values();
 
-            for (IgniteTxKey key: ownedKeys)
-                key.prepareMarshal(ctx.cacheContext(key.cacheId()));
+            for (IgniteTxKey key: ownedKeys) {
+                GridCacheContext cctx = ctx.cacheContext(key.cacheId());
 
-            if (ctx.deploymentEnabled()) {
-                for (IgniteTxKey k : owned.keySet()) {
-                    GridCacheContext cctx = ctx.cacheContext(k.cacheId());
+                key.prepareMarshal(cctx);
 
-                    if (cctx.deploymentEnabled())
-                        prepareObject(k, cctx);
-                }
+                if (ctx.deploymentEnabled() && cctx.deploymentEnabled())
+                    prepareObject(key, cctx);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/344bf0cc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index c832ac8..2462dda 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -732,18 +732,16 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
      * @throws IgniteCheckedException If failed.
      */
     public void marshal(GridCacheSharedContext<?, ?> ctx, boolean transferExpiry) throws
IgniteCheckedException {
-        GridCacheContext cctx = ctx.cacheContext(cacheId);
-
         if (filters != null) {
             for (CacheEntryPredicate p : filters) {
                 if (p != null)
-                    p.prepareMarshal(cctx);
+                    p.prepareMarshal(this.ctx);
             }
         }
 
         // Do not serialize filters if they are null.
         if (transformClosBytes == null && entryProcessorsCol != null)
-            transformClosBytes = CU.marshal(cctx, entryProcessorsCol);
+            transformClosBytes = CU.marshal(this.ctx, entryProcessorsCol);
 
         if (transferExpiry)
             transferExpiryPlc = expiryPlc != null && expiryPlc != this.ctx.expiry();
@@ -752,7 +750,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
 
         val.marshal(ctx, context());
 
-        expiryPlcBytes = transferExpiryPlc ?  CU.marshal(cctx, new IgniteExternalizableExpiryPolicy(expiryPlc))
: null;
+        expiryPlcBytes = transferExpiryPlc ?  CU.marshal(this.ctx, new IgniteExternalizableExpiryPolicy(expiryPlc))
: null;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/344bf0cc/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
index 9e0e823..deb3953 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
@@ -116,7 +116,7 @@ public class JdkMarshaller extends AbstractMarshaller {
 
     /** {@inheritDoc} */
     @Override public void onUndeploy(ClassLoader ldr) {
-
+        // No-op.
     }
 
     /** {@inheritDoc} */


Mime
View raw message