ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [22/36] incubator-ignite git commit: ignite-646
Date Wed, 06 May 2015 12:07:21 GMT
ignite-646


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

Branch: refs/heads/ignite-695
Commit: b0374bca8929687f6398076c795b68673fa244ca
Parents: b45679c
Author: avinogradov <avinogradov@gridgain.com>
Authored: Wed Apr 29 15:25:22 2015 +0300
Committer: avinogradov <avinogradov@gridgain.com>
Committed: Wed Apr 29 15:25:22 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheIoManager.java    | 13 +++++++
 .../dht/preloader/GridDhtForceKeysResponse.java | 36 ++++++++++++++++----
 2 files changed, 42 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0374bca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 14d6f7c..a6cbc37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -302,6 +302,13 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter
{
         }
     }
 
+    /**
+     * Sends response on failed message.
+     * @param nodeId node id.
+     * @param res response.
+     * @param cctx shared context.
+     * @param plc grid io policy.
+     */
     private void sendResponseOnFailedMessage(UUID nodeId, GridCacheMessage res, GridCacheSharedContext
cctx,
         GridIoPolicy plc) {
         try {
@@ -313,6 +320,12 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter
{
         }
     }
 
+    /**
+     * Processes failed messages.
+     * @param nodeId niode id.
+     * @param msg message.
+     * @throws IgniteCheckedException
+     */
     private void processFailedMessage(UUID nodeId, GridCacheMessage msg) throws IgniteCheckedException
{
         GridCacheContext ctx = cctx.cacheContext(msg.cacheId());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0374bca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
index 5c6e24f..41ce0be 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysResponse.java
@@ -43,8 +43,12 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
     private IgniteUuid miniId;
 
     /** Error. */
+    @GridDirectTransient
     private volatile IgniteCheckedException err;
 
+    /** Serialized error. */
+    private byte[] errBytes;
+
     /** Missed (not found) keys. */
     @GridToStringInclude
     @GridDirectCollection(KeyCacheObject.class)
@@ -160,6 +164,8 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
             for (GridCacheEntryInfo info : infos)
                 info.marshal(cctx);
         }
+
+        errBytes = ctx.marshaller().marshal(err);
     }
 
     /** {@inheritDoc} */
@@ -175,6 +181,8 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
             for (GridCacheEntryInfo info : infos)
                 info.unmarshal(cctx, ldr);
         }
+
+        err = ctx.marshaller().unmarshal(errBytes, ldr);
     }
 
     /** {@inheritDoc} */
@@ -193,24 +201,30 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeByteArray("errBytes", errBytes))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeCollection("infos", infos, MessageCollectionItemType.MSG))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeIgniteUuid("miniId", miniId))
+                if (!writer.writeCollection("infos", infos, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 6:
+                if (!writer.writeIgniteUuid("miniId", miniId))
+                    return false;
+
+                writer.incrementState();
+
+            case 7:
                 if (!writer.writeCollection("missedKeys", missedKeys, MessageCollectionItemType.MSG))
                     return false;
 
@@ -233,7 +247,7 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
 
         switch (reader.state()) {
             case 3:
-                futId = reader.readIgniteUuid("futId");
+                errBytes = reader.readByteArray("errBytes");
 
                 if (!reader.isLastRead())
                     return false;
@@ -241,7 +255,7 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
                 reader.incrementState();
 
             case 4:
-                infos = reader.readCollection("infos", MessageCollectionItemType.MSG);
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -249,7 +263,7 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
                 reader.incrementState();
 
             case 5:
-                miniId = reader.readIgniteUuid("miniId");
+                infos = reader.readCollection("infos", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -257,6 +271,14 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
                 reader.incrementState();
 
             case 6:
+                miniId = reader.readIgniteUuid("miniId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 7:
                 missedKeys = reader.readCollection("missedKeys", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -276,7 +298,7 @@ public class GridDhtForceKeysResponse extends GridCacheMessage implements
GridCa
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 7;
+        return 8;
     }
 
     /** {@inheritDoc} */


Mime
View raw message