keith-turner commented on issue #4877:
URL: https://github.com/apache/accumulo/issues/4877#issuecomment-2347036382

   I dug into what [this 
code](https://github.com/apache/accumulo/blob/233baddbe89850c2d303a25386ee828c0e21b23b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/logging/AccumuloMonitorAppender.java#L124)
 is doing.  Looking at the javadocs they mention an executor [will be 
created](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.Builder.html#executor(java.util.concurrent.Executor))
 if one is not supplied.  This executor is used for the sendAsync request.  The 
javadocs do not mention anything about what kind of executor is created.  
Looking at the impl of HttpClient in JDK17 it calls 
[Executors.newCachedThreadPool](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-java.util.concurrent.ThreadFactory-).
  So it seems like the current code may create an http client thread for each 
log4j append request. Since the future is ignored, this could be a lot of 
threads.  It also means that log4j 
 will have no resistance or back pressure until something breaks from too many 
threads in the server process. So thinking the code should wait on  that future 
and that would allow the log4j async mechanism to kick in.


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