[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: nar: Avoid opening the database an additional time.
From: |
guix-commits |
Subject: |
04/09: nar: Avoid opening the database an additional time. |
Date: |
Thu, 18 Jun 2020 08:49:36 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit d7fb5538013710288e91657499f0e04207115776
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Jun 18 11:58:41 2020 +0200
nar: Avoid opening the database an additional time.
* guix/nar.scm (finalize-store-file): Call 'register-items' and pass it
DB. This avoids opening the database a second time and hopefully
reduces contention on 'db.sqlite-shm'.
---
guix/nar.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/nar.scm b/guix/nar.scm
index eff4bec..16dfe28 100644
--- a/guix/nar.scm
+++ b/guix/nar.scm
@@ -27,6 +27,7 @@
;; (guix store) since this is "daemon-side" code.
#:use-module (guix store)
#:use-module (guix store database)
+ #:use-module ((guix build store-copy) #:select (store-info))
#:use-module (guix ui) ; for '_'
#:use-module (gcrypt hash)
@@ -115,9 +116,8 @@ held."
;; Register TARGET. As a side effect, it resets the timestamps of
all
;; its files, recursively, and runs a deduplication pass.
- (register-path target
- #:references references
- #:deriver deriver))
+ (register-items db
+ (list (store-info target deriver references))))
(when lock?
(delete-file (string-append target ".lock"))
- branch master updated (e418c3d -> 69288a8), guix-commits, 2020/06/18
- 01/09: repl: Fix typo that would lead ~/.guile to be used when running scripts., guix-commits, 2020/06/18
- 03/09: database: 'register-items' takes an open database., guix-commits, 2020/06/18
- 04/09: nar: Avoid opening the database an additional time.,
guix-commits <=
- 05/09: nar: Use (guix i18n)., guix-commits, 2020/06/18
- 06/09: profiles: Reindent 'linux-module-database'., guix-commits, 2020/06/18
- 08/09: doc: Delete description of a nonexistent option., guix-commits, 2020/06/18
- 02/09: build-system/gnu: Fix 'install' phase of 'gnu-dist'., guix-commits, 2020/06/18
- 07/09: profiles: 'linux-module-database' hooks gracefully handles module-less kernels., guix-commits, 2020/06/18
- 09/09: gnu: go-ipfs: Update to 0.5.1., guix-commits, 2020/06/18