diff options
author | Alex Auvolat <alex@adnab.me> | 2020-11-20 20:11:04 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-11-20 20:11:04 +0100 |
commit | e9fd265ce6d326425994ccfea9d5afc7165460db (patch) | |
tree | 9dce56810d812d6b3293e20776b58bda91c05182 /src/garage | |
parent | b9e6b007a317bf307b209cf01667fa207d62b67d (diff) | |
download | garage-e9fd265ce6d326425994ccfea9d5afc7165460db.tar.gz garage-e9fd265ce6d326425994ccfea9d5afc7165460db.zip |
Slight refactoring to make things clearer with DeletedFilter
Diffstat (limited to 'src/garage')
-rw-r--r-- | src/garage/admin_rpc.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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())) |