vjagadish1989 commented on a change in pull request #1087: SAMZA-2258: Log 
thread dump when container stop times out during processor rebalancing
URL: https://github.com/apache/samza/pull/1087#discussion_r296412999
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
 ##########
 @@ -388,8 +389,11 @@ private boolean stopSamzaContainer() {
     // we propagate to the application runner maybe overwritten by container 
failure cause in case of interleaved execution.
     // It is acceptable since container exception is much more useful compared 
to timeout exception.
     // We can infer from the logs about the fact that container shutdown timed 
out or not for additional inference.
-    if (!hasContainerShutdown && containerException == null) {
-      containerException = new TimeoutException("Container shutdown timed out 
after " + taskShutdownMs + " ms.");
+    if (!hasContainerShutdown) {
+      ThreadUtil.logThreadDump("Thread dump at failure for stopping container 
in stream processor");
 
 Review comment:
   > Are there cases other than just rebalancing
   
   For now, we can stick to logging thread-dumps on failed rebalances, since 
the value is obvious. 
   
   > so sometimes we would see a duplicate thread dump if we put this here
   
   yeah, usually a thread-dump closest to the error (like in this PR for 
example) is the most useful. The other thread-dumps are a part of 
UncaughtExceptionHandler, so may or may not get logged depending on whether the 
process is shutting down

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to