ackintosh / ganesha

:elephant: A Circuit Breaker pattern implementation for PHP applications.
https://ackintosh.github.io/ganesha/
MIT License
585 stars 42 forks source link

Check the service is available before record success #92

Open lukaskupr opened 2 years ago

lukaskupr commented 2 years ago

Solve the situation when a request that was sent before the trip may immediately overwrite the success value

ackintosh commented 2 years ago

Thank you for your pull request.

I'm not sure this change makes sense because:

  1. As shown at the Usage, users call isAvailable prior to calling success/failure.

  2. It seems impossible to completely avoid the overwrite you mentioned, because the most key-value store does not support ACID transaction. 🤔