buchgr / bazel-remote

A remote cache for Bazel
https://bazel.build
Apache License 2.0
595 stars 154 forks source link

Conditional check for cache directories in scanDir method encounters lost+found #582

Closed jrroman closed 2 years ago

jrroman commented 2 years ago

As of yesterday it looks like there was some conditional logic added to the scanDir() method of the diskCache struct. This conditional checks whether or not the directories name is equal to a few different values; please see here.

This has caused the remote cache in our environment to go into crashloop after the scanDir method encounters the lost+found directory on the linux host, this directory is created by fsck on our ext4 filesystem and will always be recreated even if deleted.

e.g.

2022/09/26 16:54:35 Scanning cache directory with 16 goroutines
2022/09/26 16:54:35 Failed to scan cache dir: Unexpected dir: lost+found
2022/09/26 16:54:35 Loading of existing cache entries failed due to error: Unexpected dir: lost+found
mostynb commented 2 years ago

Thanks for the bug report- this should be a quick fix.

jrroman commented 2 years ago

thank you for the quick turnaround @mostynb !