You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/09/12 17:46:58 UTC

[GitHub] [samza] cameronlee314 commented on a change in pull request #1151: [SAMZA-2198] Fix deadlock in container signal handler

cameronlee314 commented on a change in pull request #1151: [SAMZA-2198] Fix deadlock in container signal handler
URL: https://github.com/apache/samza/pull/1151#discussion_r323868854
 
 

 ##########
 File path: samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
 ##########
 @@ -977,18 +977,16 @@ class SamzaContainer(
   }
 
   def addShutdownHook {
-    val runLoopThread = Thread.currentThread()
     shutdownHookThread = new Thread("Samza Container Shutdown Hook Thread") {
       override def run() = {
+        val SHUTDOWN_POLL_TIME_MS = 1000
 
 Review comment:
   Would it be possible to use a lock/latch instead of polling? Polling isn't quite exact and requires properly updating other state in a thread-safe way. Does the `volatile` make the `status` update/access threadsafe?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services