[lock-createbucket] Add node-global lock for bucket/key operations (fix #723)

This commit is contained in:
Alex Auvolat
2024-02-22 12:28:21 +01:00
parent 7e212e20e0
commit cff702a951
12 changed files with 511 additions and 476 deletions
+4 -6
View File
@@ -67,6 +67,8 @@ impl Migrate {
None
};
let helper = self.garage.locked_helper().await;
self.garage
.bucket_table
.insert(&Bucket {
@@ -84,14 +86,10 @@ impl Migrate {
})
.await?;
self.garage
.bucket_helper()
.set_global_bucket_alias(bucket_id, &new_name)
.await?;
helper.set_global_bucket_alias(bucket_id, &new_name).await?;
for (k, ts, perm) in old_bucket_p.authorized_keys.items().iter() {
self.garage
.bucket_helper()
helper
.set_bucket_key_permissions(
bucket_id,
k,