From e9fd265ce6d326425994ccfea9d5afc7165460db Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 20 Nov 2020 20:11:04 +0100 Subject: Slight refactoring to make things clearer with DeletedFilter --- src/garage/admin_rpc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/garage') diff --git a/src/garage/admin_rpc.rs b/src/garage/admin_rpc.rs index b29f2f77..778e4a1d 100644 --- a/src/garage/admin_rpc.rs +++ b/src/garage/admin_rpc.rs @@ -67,7 +67,7 @@ impl AdminRpcHandler { let bucket_names = self .garage .bucket_table - .get_range(&EmptyKey, None, Some(()), 10000) + .get_range(&EmptyKey, None, Some(DeletedFilter::NotDeleted), 10000) .await? .iter() .map(|b| b.name.to_string()) @@ -101,7 +101,7 @@ impl AdminRpcHandler { let objects = self .garage .object_table - .get_range(&query.name, None, Some(()), 10) + .get_range(&query.name, None, Some(DeletedFilter::NotDeleted), 10) .await?; if !objects.is_empty() { return Err(Error::BadRPC(format!("Bucket {} is not empty", query.name))); @@ -170,7 +170,7 @@ impl AdminRpcHandler { let key_ids = self .garage .key_table - .get_range(&EmptyKey, None, Some(()), 10000) + .get_range(&EmptyKey, None, Some(DeletedFilter::NotDeleted), 10000) .await? .iter() .map(|k| (k.key_id.to_string(), k.name.to_string())) -- cgit v1.2.3