Half Open Never Closes

A breaker around a search backend is configured with a failure threshold of 5, a reset timeout of 30 seconds, and a half-open state that admits exactly one trial call. Normal calls carry a 10 second timeout, and the trial call reuses it.

The backend crashed and restarted. Its first request after a restart rebuilds an index cache and takes about 12 seconds; every request after that takes 200 ms.

t event breaker state after
0 s 5th consecutive timeout open
30 s reset timeout elapses, trial call issued half-open
40 s trial call hits its 10 s timeout ?
70 s reset timeout elapses, trial call issued half-open
80 s trial call hits its 10 s timeout ?

What does this breaker do from here, and why?

A

It closes and then immediately re-opens, because one success resets the failure count to zero and the next five real calls fail again.

B

It cycles open, half-open, open forever on a 40 second period: the single trial always lands on the 12 second cold path, exceeds the 10 second timeout, is recorded as a failure, and re-opens before any request can warm the backend.

C

It closes on the first trial after the backend is back, because the half-open probe counts only connection errors and ignores timeouts.

D

It stays open permanently, because a breaker leaves the open state only when an operator resets it manually.