From 8ac47b9bbf575fd69cb7ee2860cafd11b30a9dcf Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sun, 9 May 2021 12:49:52 +0100 Subject: [PATCH] reduce transaction retry back-off factor to 1.25 (31 retries) (#136) --- src/Simplex/Messaging/Agent/Store/SQLite.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Simplex/Messaging/Agent/Store/SQLite.hs b/src/Simplex/Messaging/Agent/Store/SQLite.hs index 42ad1ad1e..8325f4b33 100644 --- a/src/Simplex/Messaging/Agent/Store/SQLite.hs +++ b/src/Simplex/Messaging/Agent/Store/SQLite.hs @@ -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