mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.85k stars 552 forks source link

Avoid keeping lock while writing to disk cache #2193

Closed glandium closed 5 months ago

glandium commented 5 months ago

This splits the insertion operation into two separate operations, so that the lock can be released while performing I/O.

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 75.72816% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 42.77%. Comparing base (0cc0c62) to head (12e16e7). Report is 45 commits behind head on main.

Files Patch % Lines
src/lru_disk_cache/mod.rs 73.62% 4 Missing and 20 partials :warning:
src/cache/disk.rs 90.90% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2193 +/- ## =========================================== + Coverage 30.91% 42.77% +11.86% =========================================== Files 53 53 Lines 20112 20412 +300 Branches 9755 9725 -30 =========================================== + Hits 6217 8731 +2514 - Misses 7922 7982 +60 + Partials 5973 3699 -2274 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.