reduce transaction retry back-off factor to 1.25 (31 retries) (#136)

This commit is contained in:
Evgeny Poberezkin
2021-05-09 12:49:52 +01:00
committed by GitHub
parent 305bc5cb0a
commit 8ac47b9bbf

View File

@@ -104,7 +104,7 @@ withTransaction db a = loop 100 100_000
if tLim > t && DB.sqlError e == DB.ErrorBusy
then do
threadDelay t
loop (t * 3 `div` 2) (tLim - t)
loop (t * 5 `div` 4) (tLim - t)
else E.throwIO e
instance (MonadUnliftIO m, MonadError StoreError m) => MonadAgentStore SQLiteStore m where