ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [4/4] ignite git commit: 12306
Date Wed, 05 Jul 2017 12:13:49 GMT
12306


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

Branch: refs/heads/ignite-gg-12306-1
Commit: 032f2d3eff6e33ee28fe5c0108a6b6a6a461747c
Parents: 0f9a895
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Jul 5 15:13:26 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Jul 5 15:13:26 2017 +0300

----------------------------------------------------------------------
 .../cache/GridCachePartitionExchangeManager.java         |  2 +-
 .../processors/cache/transactions/IgniteTxAdapter.java   |  4 ++--
 .../cache/transactions/IgniteTxLocalAdapter.java         | 11 +++++++++--
 3 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/032f2d3e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 22345d2..d7f451b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -1550,7 +1550,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      * @param timeout Operation timeout.
      * @return {@code True} if found long running operations.
      */
-    private boolean dumpLongRunningOperations0(long timeout) {
+    public boolean dumpLongRunningOperations0(long timeout) {
         long curTime = U.currentTimeMillis();
 
         boolean found = false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/032f2d3e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index ee8afb0..284bf1a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -418,10 +418,10 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
implement
         try {
             for (IgniteTxEntry e : writeMap().values()) {
                 try {
-                    GridCacheEntryEx Entry = e.cached();
+                    GridCacheEntryEx entry = e.cached();
 
                     if (e.op() != NOOP)
-                        Entry.invalidate(null, xidVer);
+                        entry.invalidate(null, xidVer);
                 }
                 catch (Throwable t) {
                     U.error(log, "Failed to invalidate transaction entries while reverting
a commit.", t);

http://git-wip-us.apache.org/repos/asf/ignite/blob/032f2d3e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index e4b850d..3848f7d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -32,6 +32,7 @@ import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.NodeStoppingException;
 import org.apache.ignite.internal.pagemem.wal.StorageException;
 import org.apache.ignite.internal.pagemem.wal.WALPointer;
 import org.apache.ignite.internal.pagemem.wal.record.DataEntry;
@@ -828,11 +829,16 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
                             throw ex;
                         }
                         else {
+                            boolean nodeStopping = X.hasCause(ex, NodeStoppingException.class);
+
                             IgniteCheckedException err = new IgniteTxHeuristicCheckedException("Failed
to locally write to cache " +
                                 "(all transaction entries will be invalidated, however there
was a window when " +
                                 "entries for this transaction were visible to others): "
+ this, ex);
 
-                            U.error(log, "Heuristic transaction failure.", err);
+                            if (nodeStopping)
+                                U.warn(log, "Failed to commit transaction, node is stopping
[tx=" + this + ", err=" + ex + ']');
+                            else
+                                U.error(log, "Heuristic transaction failure.", err);
 
                             COMMIT_ERR_UPD.compareAndSet(this, null, err);
 
@@ -840,7 +846,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
 
                             try {
                                 // Courtesy to minimize damage.
-                                uncommit();
+                                if (!nodeStopping)
+                                    uncommit();
                             }
                             catch (Throwable ex1) {
                                 U.error(log, "Failed to uncommit transaction: " + this, ex1);


Mime
View raw message