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
|
|
@ -1706,13 +1706,16 @@ WHERE " criteria ";"))
|
|||
file-names-count (length missing-file-names))
|
||||
|
||||
(unless (null? missing-file-names)
|
||||
(for-each
|
||||
(lambda (chunk)
|
||||
(for-each
|
||||
(match-lambda
|
||||
((id file-name)
|
||||
(hash-set! derivation-ids-hash-table
|
||||
file-name
|
||||
(string->number id))))
|
||||
(exec-query conn (select-existing-derivations missing-file-names))))))
|
||||
(exec-query conn (select-existing-derivations chunk))))
|
||||
(chunk! missing-file-names 2000)))))
|
||||
|
||||
(define (derivation-file-names->derivation-ids conn derivation-file-names)
|
||||
(define (select-source-files-missing-nars derivation-ids)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue