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.12k stars 4.7k forks source link

HystrixCircuitBreaker allowRequest() doesn't have idempotent behaviour in latest release 1.5.18 #1946

Open rohansuri opened 5 years ago

rohansuri commented 5 years ago

The master includes this change PR #1568, which made allowRequest() idempotent, which was released in 1.5.12. However the latest release 1.5.18 doesn't have it.

Does anyone know why?

Thanks

didi-moritz commented 3 years ago

1.5.11 was re-released as 1.5.18. See #1891 for explanation.

l2dy commented 1 year ago

The change might have fixed a race condition in HystrixCommandMetrics that could introduce memory leaks.

resetStream() may be called in parallel with isOpen() or allowRequest(), occasionally leaking subscriptions with re-subscription of counterSubject in BucketedCounterStream.startCachingStreamValuesIfUnstarted().

https://github.com/Netflix/Hystrix/blob/809104c8751be0065a8269df3677965f3092e6b9/hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommandMetrics.java#L201-L205

https://github.com/Netflix/Hystrix/blob/809104c8751be0065a8269df3677965f3092e6b9/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/BucketedCounterStream.java#L85-L96