You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/11/18 16:56:40 UTC

ignite git commit: Perf - Fixed compatibility

Repository: ignite
Updated Branches:
  refs/heads/ignite-perftest-merge 10d71a9ee -> 8c1b75170


Perf - Fixed compatibility


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

Branch: refs/heads/ignite-perftest-merge
Commit: 8c1b7517072267aafbf9e9a171b3b32df73a0e16
Parents: 10d71a9
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Wed Nov 18 18:56:25 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Nov 18 18:56:25 2015 +0300

----------------------------------------------------------------------
 .../distributed/GridDistributedTxPrepareRequest.java | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8c1b7517/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index da932f0..95176ff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -328,13 +328,16 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
             dhtVerVals = dhtVers.values();
         }
 
-        if (txNodesMsg == null)
-            txNodesMsg = F.viewReadOnly(txNodes, COL_TO_MSG);
-
         // Marshal txNodes only if there is a node in topology with an older version.
-        if (txNodes != null && ctx.exchange().minimumNodeVersion(topologyVersion())
-            .compareTo(TX_NODES_DIRECT_MARSHALLABLE_SINCE) < 0)
-            txNodesBytes = ctx.marshaller().marshal(txNodes);
+        if (ctx.exchange().minimumNodeVersion(topologyVersion())
+            .compareTo(TX_NODES_DIRECT_MARSHALLABLE_SINCE) < 0) {
+            if (txNodes != null && txNodesBytes == null)
+                txNodesBytes = ctx.marshaller().marshal(txNodes);
+        }
+        else {
+            if (txNodesMsg == null)
+                txNodesMsg = F.viewReadOnly(txNodes, COL_TO_MSG);
+        }
     }
 
     /** {@inheritDoc} */