Health monitor doesn't clear history of deleted listeners
Assignee

Reporter

Sprint
None
Description
Steps to reproduce
None
Attachments
4
Activity
Show:

Filip Vaško October 21, 2020 at 9:26 AMEdited
Testing.
reproduced on release-5-8-1 #5 - using clean Tomcat bundle, deleted the 2 default schedules and created 2 listeners of my own. The state before and after deletion is the same (the class/field names are obfuscated here):
could not reproduce on release-5-8-1 #6 - using the same scenario, the listeners are present before deletion:
and gone after they've been deleted:
no tests have been added not needed according to @adamekl
Closing.
When a listener is deleted from server, health monitor doesn't clear its history from its in-memory data structures. This probably cases a small memory leak.
Found accidentally when refactoring:
missing call to HealthMonitor.clearHistory(DataSourceKey)
the method is called from DataServiceJobLifecycleAware and ScheduleLifecycleAware
it should probably be called also from GenericEventListenerLifecycleAware - needs verification!
Can we add tests for this? For all 3 types in health monitor.