Skip to content

Commit

Permalink
add locks for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
teowa committed May 24, 2023
1 parent 6c63bac commit 059f972
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ func (r ReplicaResource) Delete() sdk.ResourceFunc {
return err
}

locks.ByName(id.ConfigurationStoreName, r.ResourceType())
defer locks.UnlockByName(id.ConfigurationStoreName, r.ResourceType())

if err = client.DeleteThenPoll(ctx, *id); err != nil {
return fmt.Errorf("deleting %s: %+v", *id, err)
}
Expand Down

0 comments on commit 059f972

Please sign in to comment.