diff options
author | Christopher Baines <mail@cbaines.net> | 2024-06-23 00:49:26 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-06-23 00:49:26 +0100 |
commit | 8765a4f9fc124b428620048647df90ffff241cd3 (patch) | |
tree | c49ed4a4ab2fdd688989241e7f14fc43d9bb780a | |
parent | f6a4aae1c481a84cc8bd7f8c16b3a50ef5ac0686 (diff) | |
download | build-coordinator-8765a4f9fc124b428620048647df90ffff241cd3.tar build-coordinator-8765a4f9fc124b428620048647df90ffff241cd3.tar.gz |
Don't abuse the reader threads to read derivations
To avoid causing any issues with them.
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index 8af826f..34878db 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -642,19 +642,13 @@ (derivation (if derivation-exists-in-database? #f ; unnecessary to fetch derivation - ;; Bit of a hack, but offload reading the derivation to a - ;; thread so that it doesn't block the fibers thread, since - ;; local I/O doesn't cooperate with fibers - (datastore-call-with-transaction - datastore - (lambda _ - (with-fibers-port-timeouts - (lambda () - (call-with-delay-logging read-drv - #:threshold 10 - #:args (list derivation-file))) - #:timeout 240)) - #:readonly? #t))) + ;; TODO Read the derivation in a separate thread + (with-fibers-port-timeouts + (lambda () + (call-with-delay-logging read-drv + #:threshold 10 + #:args (list derivation-file))) + #:timeout 240))) (system (or system-from-database @@ -786,19 +780,13 @@ (unless (datastore-find-derivation datastore derivation-file) (datastore-store-derivation datastore - ;; Bit of a hack, but offload reading the derivation to a thread so - ;; that it doesn't block the fibers thread, since local I/O doesn't - ;; cooperate with fibers - (datastore-call-with-transaction - datastore - (lambda _ - (with-fibers-port-timeouts - (lambda () - (call-with-delay-logging read-drv - #:threshold 10 - #:args (list derivation-file))) - #:timeout 30)) - #:readonly? #t))) + ;; TODO Read the derivation in a separate thread + (with-fibers-port-timeouts + (lambda () + (call-with-delay-logging read-drv + #:threshold 10 + #:args (list derivation-file))) + #:timeout 30))) (let ((related-derivations-lacking-builds (if ensure-all-related-derivation-outputs-have-builds? |