ramanathan1504 opened a new pull request, #4111:
URL: https://github.com/apache/logging-log4j2/pull/4111

   Fixes #3926 
   
   ## Revamp ListAppender: Thread-Safety, Clarity, and Robust Testing
   
   ### Summary
   
   - Refactored `ListAppender` for consistent thread-safety:
     - Removed all `Collections.synchronizedList` usage.
     - Marked all public instance methods as `synchronized` for clear, uniform 
locking.
   - Improved efficiency and correctness of `getMessages(int, long, TimeUnit)`:
     - Replaced external polling (e.g., Awaitility) with 
`Object#wait`/`notifyAll` for in-JVM notification and reduced CPU usage.
   - Enhanced documentation:
     - Expanded and clarified class-level Javadoc.
     - Improved `countDownLatch` Javadoc with usage examples and clearer intent.
   - Strengthened test coverage:
     - Added and improved unit and concurrency tests for `ListAppender`.
     - Introduced stress tests: 10 threads × 1000 events, repeated 10 times, 
verifying both event/message count and content for loss/duplication.
   - **No changes to public API or field visibility; all existing usages remain 
valid.**
   
   ### Testing
   
   - All new and existing tests pass, including concurrency and stress 
scenarios.
   


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