Select existing derivations in chunks
To avoid one massive query.
This commit is contained in:
parent
857b4e32d5
commit
3627d36d77
1 changed files with 9 additions and 6 deletions
|
|
@ -1707,12 +1707,15 @@ WHERE " criteria ";"))
|
||||||
|
|
||||||
(unless (null? missing-file-names)
|
(unless (null? missing-file-names)
|
||||||
(for-each
|
(for-each
|
||||||
(match-lambda
|
(lambda (chunk)
|
||||||
((id file-name)
|
(for-each
|
||||||
(hash-set! derivation-ids-hash-table
|
(match-lambda
|
||||||
file-name
|
((id file-name)
|
||||||
(string->number id))))
|
(hash-set! derivation-ids-hash-table
|
||||||
(exec-query conn (select-existing-derivations missing-file-names))))))
|
file-name
|
||||||
|
(string->number id))))
|
||||||
|
(exec-query conn (select-existing-derivations chunk))))
|
||||||
|
(chunk! missing-file-names 2000)))))
|
||||||
|
|
||||||
(define (derivation-file-names->derivation-ids conn derivation-file-names)
|
(define (derivation-file-names->derivation-ids conn derivation-file-names)
|
||||||
(define (select-source-files-missing-nars derivation-ids)
|
(define (select-source-files-missing-nars derivation-ids)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue