From f7f419224f37bce51ea126b256fdbffb64e83d36 Mon Sep 17 00:00:00 2001 From: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com> Date: Mon, 10 May 2021 14:24:08 +0400 Subject: [PATCH] reduce transaction retry back-off factor to 1.125 (#137) --- 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 8325f4b33..e389a0043 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 * 5 `div` 4) (tLim - t) + loop (t * 9 `div` 8) (tLim - t) else E.throwIO e instance (MonadUnliftIO m, MonadError StoreError m) => MonadAgentStore SQLiteStore m where