capistrant opened a new pull request, #19629:
URL: https://github.com/apache/druid/pull/19629

   ### Description
   
   Using json formatted logs is not the default format shipped with Apache 
Druid stock log4j files, but many operators choose to customize their logging 
format. It is likely pretty common for them to use JSON formatted logs. As it 
stands, operators who do not add `log4j-layout-template-json` to their own 
druid bundle would be stuck with 
[JsonLayout](https://logging.apache.org/log4j/2.x/manual/layouts.html#JSONLayout)
 which is deprecated in favor of 
[JsonTemplateLayout](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html).
 In addition to being the supported way to use JSON formatted logs, this layout 
provides superior performance to the legacy Layout. Also, `JsonLayout` is 
completely removed in log4j 3.x so we will need the new dependency eventually 
either way.
   
   One of the main reasons I found myself down a rabbit hole in log4j was in 
doing some chaos testing of my configs for a virtual storage enabled data 
server. I was purposely stress testing with different configs and one such test 
put artificial load on the s3 connection pool by way oversubscribing segment 
read requests compared to the thread pools size. This lead to a cascade of 
timeouts waiting for a connection amongst other issues. but most notably was 
the data server ending up deadlocked because all of the carrier threads for the 
virtual storage load virtual threads had pinned virtual threads due to native 
calls in their stacks that I traced back to log4j exception logging. While I 
don't know that what I was doing was a very realistic scenario for day to day 
Druid operations, I do think that it raised a real potential problem for both 
perf and operations in a cluster using JSON formatted logs.
   
   #### Release note
   
   Bump log4j dependency to 2.26.0. Add `log4j-layout-template-json` as a 
dependency to allow operators to switch from deprecated `JsonFormat` to 
`JsonTemplateFormat` if they are using Json formatted logs.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `pom.xml`
    * `processing/pom.xml`
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not 
all of these items apply to every PR. Remove the items which are not done or 
not relevant to the PR. None of the items from the checklist below are strictly 
necessary, but it would be very helpful if you at least self-review the PR. -->
   
   This PR has:
   
   - [x] been self-reviewed.
   - [ ] added documentation for new or modified features or behaviors.
   - [x] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [x] been tested in a test Druid cluster.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to