ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ag...@apache.org
Subject ignite git commit: IGNITE-8642 Added thread dumping to FailureProcessor
Date Wed, 06 Jun 2018 12:03:49 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 7105e36d8 -> 34907a7e0


IGNITE-8642 Added thread dumping to FailureProcessor

Signed-off-by: Andrey Gura <agura@apache.org>


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

Branch: refs/heads/master
Commit: 34907a7e06af04521c11e178aff768e203a4e564
Parents: 7105e36
Author: Andrey Kuznetsov <stkuzma@gmail.com>
Authored: Wed Jun 6 15:02:35 2018 +0300
Committer: Andrey Gura <agura@apache.org>
Committed: Wed Jun 6 15:03:26 2018 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/IgniteSystemProperties.java | 7 +++++++
 .../internal/processors/failure/FailureProcessor.java       | 9 +++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/34907a7e/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index b6f0286..4ed4717 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -903,6 +903,13 @@ public final class IgniteSystemProperties {
     public static final String IGNITE_SKIP_PARTITION_SIZE_VALIDATION = "IGNITE_SKIP_PARTITION_SIZE_VALIDATION";
 
     /**
+     * Enables threads dumping on critical node failure.
+     *
+     * Default is {@code true}.
+     */
+    public static final String IGNITE_DUMP_THREADS_ON_FAILURE = "IGNITE_DUMP_THREADS_ON_FAILURE";
+
+    /**
      * Enforces singleton.
      */
     private IgniteSystemProperties() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/34907a7e/modules/core/src/main/java/org/apache/ignite/internal/processors/failure/FailureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/failure/FailureProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/failure/FailureProcessor.java
index b11cb95..722de18 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/failure/FailureProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/failure/FailureProcessor.java
@@ -29,10 +29,16 @@ import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.U;
 
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_DUMP_THREADS_ON_FAILURE;
+
 /**
  * General failure processing API
  */
 public class FailureProcessor extends GridProcessorAdapter {
+    /** Value of the system property that enables threads dumping on failure. */
+    private static final boolean IGNITE_DUMP_THREADS_ON_FAILURE =
+        IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_DUMP_THREADS_ON_FAILURE,
true);
+
     /** Ignite. */
     private final Ignite ignite;
 
@@ -115,6 +121,9 @@ public class FailureProcessor extends GridProcessorAdapter {
         if (reserveBuf != null && X.hasCause(failureCtx.error(), OutOfMemoryError.class))
             reserveBuf = null;
 
+        if (IGNITE_DUMP_THREADS_ON_FAILURE)
+            U.dumpThreads(log);
+
         boolean invalidated = hnd.onFailure(ignite, failureCtx);
 
         if (invalidated) {


Mime
View raw message