Found an edge case where the circuit can be opened, but brakes is showing request stats that indicate that it shouldn't have opened (because failure percentage is below threshold).
I think what might be happening is:
With several requests pending, one comes back as a failure.
Brakes sees this puts the server over the user-specified failure threshold (e.g. 50%) and opens the circuit, reporting a failure rate of 51%.
The other pending requests return successfully after the circuit has opened, which alters the request stats (bringing failure percentage down to 48%).
Brakes rejects all new requests to the server, but reports that it's doing so because the failure rate (48%) is higher than the failure threshold (50%).
This isn't a case of brakes doing the wrong thing. It's just a rare case (which will probably only happen at low numbers of requests) where the way brakes reports things could be confusing.
Found an edge case where the circuit can be opened, but brakes is showing request stats that indicate that it shouldn't have opened (because failure percentage is below threshold).
I think what might be happening is:
This isn't a case of brakes doing the wrong thing. It's just a rare case (which will probably only happen at low numbers of requests) where the way brakes reports things could be confusing.