abort GC on server shutdown

This commit is contained in:
Dietmar Maurer
2019-04-01 12:13:02 +02:00
parent 9136f857cc
commit 92da93b245
5 changed files with 18 additions and 0 deletions

View File

@ -271,6 +271,9 @@ impl ChunkStore {
min_atime -= 300; // add 5 mins gap for safety
for entry in self.get_chunk_iterator(true)? {
tools::fail_on_shutdown()?;
let (dirfd, entry) = match entry {
Ok(entry) => (entry.parent_fd(), entry),
Err(_) => continue, // ignore errors