Hi! I was testing how pybreaker would behave in various scenarios where state is being stored on Redis and the Redis server misbehaves. CircuitRedisStorage will handle intermittent and complete connection loss with the Redis server in an acceptable manner. But it doesn't handle data loss on the Redis server gracefully (it always expects to find the state on Redis).
This change modifies the state property so that if it appears that state on Redis was lost, it will try to setup the state on Redis again with the initial circuit breaker state.
Hi! I was testing how pybreaker would behave in various scenarios where state is being stored on Redis and the Redis server misbehaves.
CircuitRedisStorage
will handle intermittent and complete connection loss with the Redis server in an acceptable manner. But it doesn't handle data loss on the Redis server gracefully (it always expects to find the state on Redis).This change modifies the
state
property so that if it appears that state on Redis was lost, it will try to setup the state on Redis again with the initial circuit breaker state.