ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/27] ignite git commit: ignite-6254 : Fixed assertions for req.txState().
Date Fri, 08 Sep 2017 08:26:26 GMT
ignite-6254 : Fixed assertions for req.txState().


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

Branch: refs/heads/ignite-3478
Commit: 9d10d20c9185eb53bc4e36d20c7ac3f97bb30f8b
Parents: b3818a9
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Mon Sep 4 13:21:06 2017 +0300
Committer: Andrey Gura <agura@apache.org>
Committed: Wed Sep 6 16:04:52 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/transactions/IgniteTxHandler.java  | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9d10d20c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index 362eaac..4a13a34 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@ -777,7 +777,7 @@ public class IgniteTxHandler {
 
         IgniteInternalFuture<IgniteInternalTx> fut = finish(nodeId, null, req);
 
-        assert req.txState() != null || (fut != null && fut.error() != null) ||
+        assert req.txState() != null || fut == null || fut.error() != null ||
             (ctx.tm().tx(req.version()) == null && ctx.tm().nearTx(req.version())
== null) :
             "[req=" + req + ", fut=" + fut + "]";
 
@@ -1163,8 +1163,8 @@ public class IgniteTxHandler {
         else
             sendReply(nodeId, req, res, dhtTx, nearTx);
 
-        assert req.txState() != null || res.error() != null ||
-            (ctx.tm().tx(req.version()) == null && ctx.tm().nearTx(req.version())
== null);
+        assert req.txState() != null || res.error() != null || (dhtTx == null &&
nearTx == null) :
+            req + " tx=" + dhtTx + " nearTx=" + nearTx;
     }
 
     /**
@@ -1266,11 +1266,7 @@ public class IgniteTxHandler {
         else
             sendReply(nodeId, req, true, null);
 
-        IgniteInternalTx tx0 = ctx.tm().tx(req.version());
-
-        IgniteInternalTx nearTx0 = ctx.tm().nearTx(req.version());
-
-        assert req.txState() != null || (tx0 == null && nearTx0 == null) : req +
" tx=" + tx0 + " nearTx=" + nearTx0;
+        assert req.txState() != null || (dhtTx == null && nearTx == null) : req +
" tx=" + dhtTx + " nearTx=" + nearTx;
     }
 
     /**


Mime
View raw message