You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this library has support for saving and loading states using an external storage. However, I am wondering how to best handle concurrent executions and updating the stats.
For example, if breaker.stats stored in an external storage for success is initially 0, and two executions read the state with both functions passing, I assume the breaker.stats would be updated to 1 in both cases. If we were to write stats in both cases to external storage, they would both write 1, when in reality there were 2 successes.
Should we be handling incrementing these stats ourselves and calculating the other fields like percentiles?
The text was updated successfully, but these errors were encountered:
Hi,
I understand this library has support for saving and loading states using an external storage. However, I am wondering how to best handle concurrent executions and updating the stats.
For example, if
breaker.stats
stored in an external storage for success is initially 0, and two executions read the state with both functions passing, I assume thebreaker.stats
would be updated to 1 in both cases. If we were to write stats in both cases to external storage, they would both write 1, when in reality there were 2 successes.Should we be handling incrementing these stats ourselves and calculating the other fields like percentiles?
The text was updated successfully, but these errors were encountered: