Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

jdpgrailsdev
Copy link
Contributor

@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
Copy link
Contributor Author

@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
Copy link
Owner

bluedenim commented Mar 8, 2024 via email

@@ -284,6 +281,10 @@ public boolean stop() {
}
}

if (null != cacheMonitor) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Actually this is probably a better place to do this even without the bug since the instance cleaning up its cacheMonitor is an implementation detail that shutDown should not care about.

@bluedenim bluedenim merged commit cd5cccf into bluedenim:master Mar 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants