diff options
author | Christopher Baines <mail@cbaines.net> | 2020-02-02 10:24:29 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-02-02 11:14:35 +0100 |
commit | 65850669a07350ea10dd460ee4950cb4a25e3b60 (patch) | |
tree | c092ae359ef2078022f102ae9b7c685468fc94f3 | |
parent | 908f6d3eeebd0bbfefce4c6421d66e60b76886cd (diff) | |
download | data-service-65850669a07350ea10dd460ee4950cb4a25e3b60.tar data-service-65850669a07350ea10dd460ee4950cb4a25e3b60.tar.gz |
Log the time to lock package_versions_by_guix_revision_range
-rw-r--r-- | guix-data-service/jobs/load-new-guix-revision.scm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 3397a68..1e73430 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -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) - ;; Lock the table to wait for other transactions to commit before updating - ;; the table - (exec-query - conn - " + (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 |