Commit graph

1468 commits

Author SHA1 Message Date
b128e9bd7a Improve null handling 2024-12-01 22:56:12 +00:00
bb84e45c42 Handle conflicts in insert-missing-data-and-return-all-ids 2024-12-01 22:56:12 +00:00
c949deb9d4 Memoize field-can-be-null? 2024-11-29 14:06:08 +00:00
930169751c Handle conflicts when inserting lint warning message sets 2024-11-29 14:06:08 +00:00
9a38374e7c Use insert-missing-data-and-return-all-ids for locations 2024-11-29 14:06:08 +00:00
221394eafb Add in call-with-worker-thread to try to avoid sort problems 2024-11-29 13:49:38 +00:00
cb1bc060c8 Move log message 2024-11-29 10:37:56 +00:00
e14fd88d8f Don't lookup #f in the hash table 2024-11-29 10:09:41 +00:00
64aeeffd8e Insert guix_revision_package_derivation_distribution_counts later
As this should speed up processing revisions.
2024-11-26 14:12:17 +00:00
620ac16e26 Don't crash when linters crash
This is currently happening because some linters try to evaluate parts of
packages for cross-building to aarch64-linux-gnu, but not all packages support
that and some crash in this case.

I'm not quite sure what the correct behaviour should be, but maybe the data
service needs to try and handle these crashes rather than not processing the
entire revision.
2024-11-26 09:27:50 +00:00
112bc95a13 Restore calling update-derivation-ids-hash-table!
In derivation-file-names->derivation-ids. This is important for performance
since it avoids reading derivations with an entry already in the database.
2024-11-25 10:56:01 +00:00
bda4269b56 Change to logging the filtered derivations
As that's what's relevant here.
2024-11-25 10:55:45 +00:00
84e78ef3ed Stop queries being able to insert systems 2024-11-13 09:55:03 +00:00
e7ada1bada Allow using the heap profiler in the inferior 2024-11-08 22:34:28 +00:00
ebeb4212ff More efficiently create some vectors
And instrument the inferior memory after creating the gds-inferior-packages
vector.
2024-11-08 22:34:28 +00:00
ca5f0036f3 Add a heap-profiler module
Taken from a Guile mailing list post.
2024-11-08 22:34:28 +00:00
0c1e9ad4e4 Do more when cleaning inferiors
Not sure if this actually helps, but it might do.
2024-11-08 12:59:08 +00:00
7ffe82dfe3 Add log-tag when inserting channel instance derivations 2024-11-08 12:54:14 +00:00
58af8e2dc7 Fix git-commit-exists? 2024-11-08 12:52:48 +00:00
3f07df510e Fix sorting license sets 2024-11-08 12:52:29 +00:00
c58ee6726b Fix starting with an empty database 2024-11-08 12:52:18 +00:00
717b861d31 Have the background resource pool users be very patient 2024-11-05 09:41:46 +00:00
6bf1747f55 Always assume that resource pool waiters will stick around
As I think this is a more efficient design.
2024-11-05 09:41:30 +00:00
d310632f26 Move the inferior cleanup to the end of each system+target 2024-11-04 08:40:45 +00:00
cee8868bfd Refactor 2024-11-03 21:24:24 +00:00
ed6a4b1577 Use a separate db connection in channel-derivations-by-system-promise
As this can run in parallel with something else using conn.
2024-11-02 09:35:23 +00:00
6265c37e89 Increase the sleep-operation time for telling waiters to retry
As this being too short was leading call-with-resource-pool to get stuck.
2024-10-31 20:04:16 +00:00
e67edf54bc Finish chasing the call-with-resource-pool bug
This took a while to find as process-job would just get stuck, and this wasn't
directly related to any particular change, just that more fibers increased the
chance of hitting it.

This commit includes lots of the things I changed while debugging.
2024-10-31 20:04:16 +00:00
af93bdcf5e Tweak the resource pool return behaviour
If there's lots of contention for the resource pool, there will be lots of
waiters, so telling all of them to retry whenever a resource is returned seems
wasteful. This commit adds a new option (assume-reliable-waiters?) which will
have the resource pool try to give a returned resource to the oldest waiter,
if this fails, it'll go back to the old behaviour of telling all waiters to
retry.
2024-10-31 16:46:43 +00:00
de5e036ab1 Ensure that call-with-resource-from-pool doesn't get stuck
As I think this was happening when it missed the resource-pool-retry-checkout
reply from the resource pool. Handle this case by periodically retrying with a
configurable timeout.
2024-10-31 16:45:09 +00:00
2d7100e75d Add call-with-default-io-waiters
As this is useful when starting threads from a fibers context.
2024-10-31 16:44:15 +00:00
55af7c82e8 Add new fibers utilities
The new fibers-map uses the same batching approach that fibers-for-each uses,
and fibers-map-with-progress allows tracking on the results while the map is
happening.
2024-10-31 16:43:13 +00:00
f8ac6e3dd9 Add make-queueing-channel
From the build coordinator.
2024-10-31 16:42:42 +00:00
1782a33a18 Add a comment 2024-10-27 14:39:52 +00:00
c650fc6e7a Rework inserting derivations
To add more parallelism.
2024-10-27 14:39:52 +00:00
1e0407e9b6 Use a common derivation-ids-hash-table
To allow for calling derivation-file-names->derivation-ids in parallel across
multiple fibers, using the PostgreSQL connection fiber to perform atomic
operations.
2024-10-27 14:39:52 +00:00
38d5501233 Add placeholder derivation source file nar procedures 2024-10-27 14:39:52 +00:00
ff32aa899e Include the package version in the "error when computing" messages
As this helps when there are lots of packages with the same name.
2024-10-27 14:39:52 +00:00
052cf7580c Ensure the guix derivations are stored prior to attempting to substitute 2024-10-27 14:39:52 +00:00
38e5282546 Add fibers-promise-reset 2024-10-27 14:39:52 +00:00
d53b91dd91 Fix extract-information-from message 2024-10-27 14:39:52 +00:00
b6551842d1 Increase parallelism when loading revisions 2024-10-27 14:39:50 +00:00
f1071cbd4d Use a dedicated fiber for heap size monitoring 2024-10-27 14:38:50 +00:00
46b86761f5 Fix free-disk-space call
As the WAL file might not exist.
2024-10-13 19:12:09 +01:00
c04ea067c2 Make the WAL threshold more flexible
So that the WAL can grow more when there's sufficient space. When the
inferiors are closed it takes time to restart them, so doing this less should
speed up processing revisions.
2024-10-10 18:26:35 +01:00
bb5b3731c8 Vacuum some tables when deleting derivations 2024-10-04 08:14:38 +01:00
53ddb26300 Don't use the reserved pool for HTML/JSON responses
Just use it for providing substitutes.
2024-09-08 12:58:39 +01:00
395d0b2bd0 Include background pool metrics 2024-09-08 12:58:24 +01:00
8253a21196 Increase the resource pool default timeout a little 2024-09-08 11:54:22 +01:00
eac37b9e8a Speed up package-description-and-synopsis-locale-options-guix-revision 2024-09-08 11:19:44 +01:00