cb2 icon indicating copy to clipboard operation
cb2 copied to clipboard

CB2 stays half open forever after being tripped open once

Open v-yarotsky opened this issue 9 years ago • 2 comments

Hi It looks like CB2 can never become fully closed after being opened once. Here's a failing test.

The rolling window strategy's #half_open? is pretty much the opposite of #open?, which is not what it is supposed to represent.

I was thinking of having a success callback in a strategy, which would reset last_open if the circuit breaker is currently half-open. This would solve the issue in a single-threaded case, although in a hacky manner, but there are going to be issues with concurrent clients (cranking up number of WORKERS in the test to 50 or so exposes the issue).

v-yarotsky avatar May 20 '15 22:05 v-yarotsky

I think this is closeable now?

jphenow avatar May 02 '16 23:05 jphenow

@pedro

victorhazbun avatar Jul 20 '18 00:07 victorhazbun

Looks like this was fixed in v0.0.3

prognostikos avatar Jul 13 '23 08:07 prognostikos