cameronlee314 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_r295966960
 
 

 ##########
 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:
   @vjagadish1989 do you think we should only do a thread dump when the 
processor is in certain states? The change here applies to rebalancing and 
shutting down. `SamzaContainer` does have its own thread dump when it doesn't 
shut down in time, so sometimes we would see a duplicate thread dump if we put 
this here.
   An alternative would be to put this thread dump inside `onJobModelExpired` 
or check the state of the processor before initiating the thread dump. Are 
there cases other than just rebalancing where we would want this thread dump?

----------------------------------------------------------------
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