Skip to content

[BUG] Cache: Cache registers nars although upload failed (due to md5 mismatch) #13

Description

@SirBerg

When uploading large Derivations (like Datagrip, Pycharm, etc.) in the multiple gigabyte regions uploads sometimes get corrupted, in this case the cache responds with http status 400, status code "Unacceptable".
This causes the cachix upload to retry the upload (up to 5 times), if the cachix client cannot upload a derivation after 5 retries, it stops trying and quits.
In this case, the derivation is not entirely uploaded (only the part files are present on the cache) but the cache still registers the derivations as stored (although the complete route is never called which is quite weird).
There are two possible causes for this:

  1. The Cachix client does upload the derivations successfully but the cachix client flow is somehow wrong (very unlikely)
  2. Something in the cache creates the derivation entry too early in the database and that causes the derivation_tenant_link to be present for a later multipart-nar query (very likely)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions