diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-03 19:06:04 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-04 12:53:14 +0100 |
commit | df35feba18787cac06b2a87e3426752fb78da2d5 (patch) | |
tree | 9e7de3ade1ced3d47518854287ecd34c91b1a9be /src/garage/admin.rs | |
parent | 1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec (diff) | |
download | garage-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/garage/admin.rs')
-rw-r--r-- | src/garage/admin.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/garage/admin.rs b/src/garage/admin.rs index bca1bc5a..b1eb6915 100644 --- a/src/garage/admin.rs +++ b/src/garage/admin.rs @@ -38,7 +38,7 @@ pub enum AdminRpc { // Replies Ok(String), - BucketList(Vec<BucketAlias>), + BucketList(Vec<Bucket>), BucketInfo(Bucket, HashMap<String, Key>), KeyList(Vec<(String, String)>), KeyInfo(Key, HashMap<Uuid, Bucket>), @@ -76,12 +76,12 @@ impl AdminRpcHandler { } async fn handle_list_buckets(&self) -> Result<AdminRpc, Error> { - let bucket_aliases = self + let buckets = self .garage - .bucket_alias_table + .bucket_table .get_range(&EmptyKey, None, Some(DeletedFilter::NotDeleted), 10000) .await?; - Ok(AdminRpc::BucketList(bucket_aliases)) + Ok(AdminRpc::BucketList(buckets)) } async fn handle_bucket_info(&self, query: &BucketOpt) -> Result<AdminRpc, Error> { @@ -536,7 +536,7 @@ impl AdminRpcHandler { .items() .iter() { - if let Some(b) = self.garage.bucket_table.get(id, &EmptyKey).await? { + if let Some(b) = self.garage.bucket_table.get(&EmptyKey, id).await? { relevant_buckets.insert(*id, b); } } |