Health monitor doesn't clear history of deleted listeners

Assignee

Reporter

Sprint

Description

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.

Steps to reproduce

None

Attachments

4

Activity

Show:

Filip Vaško October 21, 2020 at 9:26 AM
Edited

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.

Fixed

Details

Story Points

Priority

Fix versions

QA Testing

UNDECIDED
Created October 19, 2020 at 10:49 AM
Updated September 12, 2023 at 8:44 AM
Resolved October 20, 2020 at 9:33 AM