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

HystrixCircuitBreakerImpl isOpen can return false incorrectly #745

Closed
mswintermeyer opened this issue Apr 8, 2015 · 2 comments · Fixed by #748
Closed

HystrixCircuitBreakerImpl isOpen can return false incorrectly #745

mswintermeyer opened this issue Apr 8, 2015 · 2 comments · Fixed by #748

Comments

@mswintermeyer
Copy link

At the end of the method, after the compareAndSet, it should always be return true. compareAndSet sets the value to the given updated value if the current value == the expected value. If the method returns false, it means that the current value is already true, which means the circuit is open (another thread got here first in a race) and we should return true.

@mattrjacobs
Copy link
Contributor

Thanks for the report @mswintermeyer , I'll look into it

@mswintermeyer mswintermeyer changed the title HystrixCircuitBreakerImpl isOpen can return true incorrectly HystrixCircuitBreakerImpl isOpen can return false incorrectly Apr 8, 2015
@mattrjacobs
Copy link
Contributor

Yes, I agree with your fix. Nice catch! I'm getting a PR ready right now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants