[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Set lock_timeout for some data deletion transacti
From: |
Christopher Baines |
Subject: |
branch master updated: Set lock_timeout for some data deletion transactions |
Date: |
Tue, 09 May 2023 03:55:44 -0400 |
This is an automated email from the git hooks/post-receive script.
cbaines pushed a commit to branch master
in repository data-service.
The following commit(s) were added to refs/heads/master by this push:
new 47c482b Set lock_timeout for some data deletion transactions
47c482b is described below
commit 47c482bdcc40d57d871accf576a6c19ac4c08039
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Tue May 9 08:55:09 2023 +0100
Set lock_timeout for some data deletion transactions
As these can cause deadlocks. This will probably cause errors, so some
retrying will need to be added.
---
guix-data-service/data-deletion.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/guix-data-service/data-deletion.scm
b/guix-data-service/data-deletion.scm
index 29272ac..918656e 100644
--- a/guix-data-service/data-deletion.scm
+++ b/guix-data-service/data-deletion.scm
@@ -212,6 +212,8 @@ WHERE id IN (
conn
'delete-revisions-from-branch)
+ (exec-query conn "SET LOCAL lock_timeout = '5s';")
+
(delete-from-git-commits conn)
(delete-jobs conn)
@@ -581,6 +583,8 @@ WHERE NOT EXISTS (
"
SET CONSTRAINTS derivations_by_output_details_set_derivation_id_fkey DEFERRED")
+ (exec-query conn "SET LOCAL lock_timeout = '5s';")
+
(maybe-delete-derivation conn
derivation-id))))))
derivations)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Set lock_timeout for some data deletion transactions,
Christopher Baines <=