Log the time to lock package_versions_by_guix_revision_range

This commit is contained in:
Christopher Baines 2020-02-02 10:24:29 +01:00
parent 908f6d3eee
commit 65850669a0

View file

@ -984,13 +984,16 @@ WHERE job_id = $1"
(display-backtrace (make-stack #t) (current-error-port)))))))
(define (update-package-versions-table conn git-repository-id commit)
(log-time
"lock table: package_versions_by_guix_revision_range"
(lambda ()
;; Lock the table to wait for other transactions to commit before updating
;; the table
(exec-query
conn
"
LOCK TABLE ONLY package_versions_by_guix_revision_range
IN SHARE ROW EXCLUSIVE MODE")
IN SHARE ROW EXCLUSIVE MODE")))
(for-each
(match-lambda