mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-11 23:06:54 +00:00
[lock-createbucket] Add node-global lock for bucket/key operations (fix #723)
This commit is contained in:
@@ -151,11 +151,11 @@ pub async fn handle_delete_key(
|
||||
garage: &Arc<Garage>,
|
||||
id: String,
|
||||
) -> Result<Response<ResBody>, Error> {
|
||||
let mut key = garage.key_helper().get_existing_key(&id).await?;
|
||||
let helper = garage.locked_helper().await;
|
||||
|
||||
key.state.as_option().unwrap();
|
||||
let mut key = helper.key().get_existing_key(&id).await?;
|
||||
|
||||
garage.key_helper().delete_key(&mut key).await?;
|
||||
helper.delete_key(&mut key).await?;
|
||||
|
||||
Ok(Response::builder()
|
||||
.status(StatusCode::NO_CONTENT)
|
||||
|
||||
Reference in New Issue
Block a user