containers / storage

Container Storage Library
Apache License 2.0
558 stars 239 forks source link

chunked: add fuzzing tests for the cache #1963

Closed giuseppe closed 3 months ago

giuseppe commented 3 months ago

and fix some issues found with the new tests.

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/containers/storage/blob/main/OWNERS)~~ [giuseppe] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
cgwalters commented 3 months ago

I was unaware of this whole subsystem until now. This is the thing keeping indicies of chunks that are used for inside-a-file partial pulls?

The changes seem sane superficially.

giuseppe commented 3 months ago

I was unaware of this whole subsystem until now. This is the thing keeping indicies of chunks that are used for inside-a-file partial pulls?

yes, this is needed to avoid parsing the json metadata files each time we lookup for a digest. In the same cache file we store the files payload digest, the chunks digest and the hard link fingerprint. The hard link fingerprint a digest that is used to find files that can be used for hard links deduplication (payload digest + UID + GID + mode + xattrs).

rhatdan commented 3 months ago

/lgtm