Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce aggregated result files #411

Closed
jrosdahl opened this issue May 5, 2019 · 7 comments
Closed

Introduce aggregated result files #411

jrosdahl opened this issue May 5, 2019 · 7 comments
Labels
feature New or improved feature
Milestone

Comments

@jrosdahl
Copy link
Member

jrosdahl commented May 5, 2019

Background

See #218.

What to do

  • Use a file format as discussed/prototyped in Introduce aggregated result files #218.
  • Keep result files uncompressed by default and allow for compression using zlib if compression is enabled explicitly.
  • Remove support for hard links.
    • Rationale: The hard links feature has proven to be prone to errors: a) changes to files outside the cache will corrupt the cache; b) the mtime field in the file's i-node is used for different purposes by ccache and build tools like make.
@jrosdahl jrosdahl added the feature New or improved feature label May 5, 2019
@jrosdahl
Copy link
Member Author

jrosdahl commented May 5, 2019

@afbjorklund is working on this in #408.

@afbjorklund
Copy link
Contributor

This work is based on the original memcached code (#30) and the manifest format (ccache 3.0).

Basically we write out the length, and then we write out the contents. Nothing fancier than that...

@jrosdahl
Copy link
Member Author

From #384 (comment):

I guess the --dump-result will just create files with the contents, rather than writing them on console ?

I haven't thought about it earlier, but spontaneously I would suggest a --dump-result which only describes headers and some other option (--unpack-result?) which writes the contained files to the file system.

@afbjorklund
Copy link
Contributor

Initial implementation is ready, seems to be passing the tests at least.

@afbjorklund
Copy link
Contributor

This implementation is still very file-centric, since it takes a cache path rather than a cache key.

e.g. ~/.ccache/1/0/066a3f1308f635a823b92939c8a3de-17195.result
instead of something like 10066a3f1308f635a823b92939c8a3de-17195

Also the implementation uses the gzFile functions, when working with the manifest and result files.


It's not a problem for this feature, means there are more things left to do for other features.
For instance it won't work with database backends, and won't work with LZ4 compression.

@jrosdahl jrosdahl added this to the 3.8 milestone May 28, 2019
@jrosdahl
Copy link
Member Author

jrosdahl commented Jun 5, 2019

Status: #408 and some additional work is now on master.

There are still some minor things to do, so I'm keeping this issue open for now. Thanks again @afbjorklund for the initial implementation!

@jrosdahl
Copy link
Member Author

I consider this done now. I still have some related refactoring on my to do list, but that'll be done sometime later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New or improved feature
Projects
None yet
Development

No branches or pull requests

2 participants