I noticed a bunch of cases where we were swallowing database errors in the SQL keystore. This fixes all of those and makes it hard fail if there is a database connection problem.
Renames MemoryKeystoreError to SqlKeyStoreError
Makes more error types support the RetryableError trait
Notes
This is causing even more database locking errors, but that's a lot better than having read/write/delete operations failing silently. I had to add more retries to the default error handler to make this work, which is bad. Exponential backoff would be better than just hammering the db repeatedly.
The end goal of this is to better handle errors in process_for_id when syncing messages. If you have a bad message that fails, we don't really know whether to retry it or roll back the commit and move on to the next message in the queue.
tl;dr
MemoryKeystoreError
toSqlKeyStoreError
Notes
This is causing even more database locking errors, but that's a lot better than having read/write/delete operations failing silently. I had to add more retries to the default error handler to make this work, which is bad. Exponential backoff would be better than just hammering the db repeatedly.
The end goal of this is to better handle errors in
process_for_id
when syncing messages. If you have a bad message that fails, we don't really know whether to retry it or roll back the commit and move on to the next message in the queue.