Netflix / Hystrix

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
24.08k stars 4.7k forks source link

Fixed possible memory leak in ScheduledThreadPoolExecutor (HystrixTimer.java) #1976

Open Jagden opened 4 years ago

Jagden commented 4 years ago

Found what seems to be a possible memory leak inside HystrixTimer.java caused by cancel operations called on tasks inside a ScheduledThreadPoolExecutor. The fix helped us and solved the leakage. Tasks that were canceled due to timeouts were not removed from the scheduler queues unless setRemoveOnCancelPolicy(true) was called on that scheduler on initialization.

tweimer commented 4 years ago

Fixes #1998