jia-gao opened a new pull request, #1652:
URL: https://github.com/apache/samza/pull/1652

   Issue:
   In StreamAppender, there is a synchronized block around setupSystem(), which 
should be called the first time (after loggingContext config is set up) any 
logger logs something.
   It could lead to a deadlock situation. Because if during the setupSystem(), 
any other threads try to do LOG.xxx(), they will be blocked, and if the system 
setup depends on those threads, it leads to deadlock
   
   Change:
   Replace the synchronized block with a 
[tryLock](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html#tryLock(long,%20java.util.concurrent.TimeUnit))(long
 time, 
[TimeUnit](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeUnit.html)
 unit)
   so that other threads won't be blocked forever if setupSystem() stuck or 
timeout
   
   Test Done:
   Add new units for the change
   ./gradlew build


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to