ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-257 - Fixed discovered issue with check backup logic.
Date Fri, 25 Sep 2015 22:54:47 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-257 287406a7c -> b33a9c6b2


IGNITE-257 - Fixed discovered issue with check backup logic.


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

Branch: refs/heads/ignite-257
Commit: b33a9c6b28146073fa255c7295f25e91432ecff0
Parents: 287406a
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Fri Sep 25 15:54:33 2015 -0700
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Sep 25 15:54:33 2015 -0700

----------------------------------------------------------------------
 .../distributed/near/GridNearTxFinishFuture.java |  2 +-
 .../cache/distributed/near/GridNearTxLocal.java  | 19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b33a9c6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index edb0424..85311cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -333,7 +333,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
      * Initializes future.
      */
     void finish() {
-        if (tx.needCheckBackup()) {
+        if (tx.onNeedCheckBackup()) {
             assert tx.onePhaseCommit();
 
             checkBackup();

http://git-wip-us.apache.org/repos/asf/ignite/blob/b33a9c6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index a4e06c3..8975b4a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -114,7 +114,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter {
     private Map<IgniteTxKey, IgniteCacheExpiryPolicy> accessMap;
 
     /** */
-    private boolean needCheckBackup;
+    private Boolean needCheckBackup;
 
     /** */
     private boolean hasRemoteLocks;
@@ -255,8 +255,23 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter {
     /**
      * @return If need to check tx commit on backup.
      */
+    public boolean onNeedCheckBackup() {
+        Boolean check = needCheckBackup;
+
+        if (check != null && check) {
+            needCheckBackup = false;
+
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * @return If backup check was requested.
+     */
     public boolean needCheckBackup() {
-        return needCheckBackup;
+        return needCheckBackup != null;
     }
 
     /**


Mime
View raw message