aboutsummaryrefslogtreecommitdiff
path: root/src/model/helper/bucket.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-03 19:06:04 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:53:14 +0100
commitdf35feba18787cac06b2a87e3426752fb78da2d5 (patch)
tree9e7de3ade1ced3d47518854287ecd34c91b1a9be /src/model/helper/bucket.rs
parent1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec (diff)
downloadgarage-df35feba18787cac06b2a87e3426752fb78da2d5.tar.gz
garage-df35feba18787cac06b2a87e3426752fb78da2d5.zip
New buckets for 0.6.0: make bucket id a SK and not a HK, CLI updates
Diffstat (limited to 'src/model/helper/bucket.rs')
-rw-r--r--src/model/helper/bucket.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/helper/bucket.rs b/src/model/helper/bucket.rs
index 52cedb12..6f171c8b 100644
--- a/src/model/helper/bucket.rs
+++ b/src/model/helper/bucket.rs
@@ -36,7 +36,7 @@ impl<'a> BucketHelper<'a> {
Ok(self
.0
.bucket_table
- .get(&bucket_id, &EmptyKey)
+ .get(&EmptyKey, &bucket_id)
.await?
.filter(|x| !x.state.is_deleted())
.map(|_| bucket_id))
@@ -58,7 +58,7 @@ impl<'a> BucketHelper<'a> {
Ok(self
.0
.bucket_table
- .get(&bucket_id, &EmptyKey)
+ .get(&EmptyKey, &bucket_id)
.await?
.ok_or_message(format!("Bucket {:?} does not exist", bucket_id))?)
}
@@ -70,7 +70,7 @@ impl<'a> BucketHelper<'a> {
pub async fn get_existing_bucket(&self, bucket_id: Uuid) -> Result<Bucket, Error> {
self.0
.bucket_table
- .get(&bucket_id, &EmptyKey)
+ .get(&EmptyKey, &bucket_id)
.await?
.filter(|b| !b.is_deleted())
.ok_or_bad_request(format!(