Workiva / eva

A distributed database-system implementing an entity-attribute-value data-model that is time-aware, accumulative, and atomically consistent
Other
565 stars 25 forks source link

`with-retries` macro sometimes doesn't retry #86

Open tylerwilding-wk opened 5 years ago

tylerwilding-wk commented 5 years ago

There is a subclass of exceptions that the with-retries macro is setup to ignore. I believe this was originally to bypass non-transient exceptions when doing things like passing a bad value to the indexes for comparison, but don't recall exactly.

https://github.com/Workiva/eva/blob/e6196d5e2a215e69dc6dce0651867067ba677cba/core/src/eva/utils.clj#L262

The original reason this behavior was desirable needs to be rediscovered and documented, and the with-retries macro should not be responsible for handling this failure case. A good replacement would be to modify the retries macro to either accept a set of white-listed transient or black-listed non-transient set of exceptions to retry with.