]> git.ipfire.org Git - thirdparty/ccache.git/commit
cleanup: Improve robustness when multiple cleanups run concurrently
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 12 Mar 2018 21:25:28 +0000 (22:25 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 13 Mar 2018 13:41:24 +0000 (14:41 +0100)
commit4fc191a554330079621f0c53c6d2023f1babd552
treee56c23815a16dc8a146a334d98ef79cc658da0d2
parent3575a9a2877005995be1076eccec390be65b78d6
cleanup: Improve robustness when multiple cleanups run concurrently

The file count/size counters are now intentionally subtracted even if
there file to delete has disappeared since the final cache size
calculation will be incorrect if they aren’t. This can happen when there
are several parallel ongoing cleanups of the same subdirectory.

Also removed the “delete sibling files” logic; it’s unnecessary for all
siblings except .stderr since that’s the only file in a result that is
optional. Any other missing file will be detected by
get_file_from_cache.
doc/NEWS.adoc
src/cleanup.c
test/run
test/suites/cleanup.bash