datastore: use new ProcessLocker

To make sure only one process runs garbage collection while having active writers.
This commit is contained in:
Dietmar Maurer
2019-03-22 09:42:15 +01:00
parent abfc001f25
commit 43b1303398
4 changed files with 25 additions and 10 deletions

View File

@ -227,6 +227,8 @@ impl DataStore {
if let Ok(ref mut _mutex) = self.gc_mutex.try_lock() {
let _exclusive_lock = self.chunk_store.try_exclusive_lock()?;
let mut gc_status = GarbageCollectionStatus::default();
gc_status.used_bytes = 0;