mynameborat commented on code in PR #1652:
URL: https://github.com/apache/samza/pull/1652#discussion_r1092576559


##########
samza-log4j2/src/main/java/org/apache/samza/logging/log4j2/StreamAppender.java:
##########
@@ -186,13 +190,20 @@ public void append(LogEvent event) {
       if (!systemInitialized) {
         // configs are needed to set up producer system, so check that before 
actually initializing
         if (this.loggingContextHolder.getConfig() != null) {
-          synchronized (this) {
-            if (!systemInitialized) {
-              setupSystem();
-              systemInitialized = true;
+          if (setUpSystemLock.tryLock(SET_UP_SYSTEM_TIMEOUT_MILLI_SECONDS, 
TimeUnit.MILLISECONDS)) {
+            try {
+              if (!systemInitialized) {
+                setupSystem();

Review Comment:
   I am not sure where we landed here. Can you update the comment with our 
discussion?



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