Avoid getting the load-new-guix-revision-inserts lock twice

This commit is contained in:
Christopher Baines 2024-12-08 20:03:12 +00:00
parent 62fc9b7225
commit 859b0093f8

View file

@ -1864,6 +1864,11 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
(define postgresql-connection-pool
(make-resource-pool
(lambda ()
(with-time-logging
"waiting for guix-revision-id"
;; This uses the transaction lock, so wait until the transaction has
;; committed
(fibers-force guix-revision-id-promise))
(with-time-logging
"acquiring advisory transaction lock: load-new-guix-revision-inserts"
;; Wait until this is the only transaction inserting data, to