diff options
-rw-r--r-- | guix-data-service/jobs/load-new-guix-revision.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 716e186..5abe945 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -1265,8 +1265,11 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1" (lambda () ;; If this has happened because derivations have been removed, it ;; might be necessary to insert them in the database where they - ;; previously existed - (hash-clear! derivation-ids-hash-table) + ;; previously existed. Clear the hash table while having the + ;; PostgreSQL connection to avoid issues with it being used at the + ;; same time. + (with-resource-from-pool postgresql-connection-pool conn + (hash-clear! derivation-ids-hash-table)) (insert-input-derivations derivations)))))) (define (fix-derivation file-name) |