Michael Blow has submitted this change and it was merged.

Change subject: [NO ISSUE] Log the threaddump of the NC at shutdown
......................................................................


[NO ISSUE] Log the threaddump of the NC at shutdown

To assist in debugging issues that may have triggered a shutdown, info
log the node's thread dump at the start of a shutdown request.

Change-Id: I55adc38ca9c66b1e75486f0e9715e1d475917ee6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2042
Reviewed-by: Murtadha Hubail <[email protected]>
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
---
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jenkins: Verified; No violations found; ; Verified
  Murtadha Hubail: Looks good to me, approved

Objections:
  Anon. E. Moose #1000171: 



diff --git 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
index 1cd45b2..0a02635 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java
@@ -21,6 +21,8 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.hyracks.util.ThreadDumpUtil;
+
 /**
  * Shutdown hook that invokes {@link NodeControllerService#stop() stop} method.
  * This shutdown hook must have a failsafe mechanism to halt the process in 
case the shutdown
@@ -67,6 +69,7 @@
             }
             shutdownHookThread = Thread.currentThread();
             watchDog.start();
+            LOGGER.log(Level.INFO, () -> "Thread dump at shutdown: " + 
ThreadDumpUtil.takeDumpString());
             nodeControllerService.stop();
         } catch (Throwable th) { // NOSONAR... This is fine since this is 
shutdown hook
             LOGGER.log(Level.WARNING, "Exception in executing shutdown hook", 
th);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2042
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I55adc38ca9c66b1e75486f0e9715e1d475917ee6
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>

Reply via email to