bluedenim / log4j-s3-search

Log4j appender with S3, Azure, Google Cloud, and search publishing
MIT License
65 stars 44 forks source link

Ensure that cache monitor is shut down when appender is stopped #145

Closed jdpgrailsdev closed 6 months ago

jdpgrailsdev commented 7 months ago

@bluedenim Found one more leak after integrating the previous fix. The TimePeriodBasedBufferMonitor also creates an executor service that is not properly being shut down when the dynamically allocated appender is stopped. Simple fix is to move the shutdown call to the cache monitor into the same extracted method in the previous PR. The good news here is that the previous fix did address the leak of the LoggingEventCache-publish-thread. Now, we see a leak of the TimePeriodBasedBufferMonitor-publish-trigger, which this fix should address.

jdpgrailsdev commented 6 months ago

@bluedenim Any chance that you could take a look at this PR this weekend? Let me know if you need anything else from me to get this over the finish line. Thanks!

bluedenim commented 6 months ago

Hello. Definitely. I've been swamped with work this week but will take a look tomorrow.