Slight refactoring to make things clearer with DeletedFilter

This commit is contained in:
Alex Auvolat
2020-11-20 20:11:04 +01:00
parent b9e6b007a3
commit e9fd265ce6
11 changed files with 90 additions and 55 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ use garage_rpc::rpc_client::*;
use garage_rpc::rpc_server::*;
use garage_table::table_sharded::TableShardedReplication;
use garage_table::TableReplication;
use garage_table::{TableReplication, DeletedFilter};
use crate::block_ref_table::*;
@@ -306,7 +306,7 @@ impl BlockManager {
let garage = self.garage.load_full().unwrap();
let active_refs = garage
.block_ref_table
.get_range(&hash, None, Some(()), 1)
.get_range(&hash, None, Some(DeletedFilter::NotDeleted), 1)
.await?;
let needed_by_others = !active_refs.is_empty();
if needed_by_others {