Skip to content

Commit

Permalink
[dss/SCD] early subscription lock for OIR deletions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shastick committed Sep 12, 2024
1 parent 97bbbe5 commit 7de59f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/scd/operational_intents_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ func (a *Server) DeleteOperationalIntentReference(ctx context.Context, req *rest
"Current version is %s but client specified version %s", old.OVN, ovn)
}

// Early lock on the subscriptions covering the cells relevant to the OIR
// See issue #1002 for details.
err = r.LockSubscriptionsOnCells(ctx, old.Cells)
if err != nil {
return stacktrace.Propagate(err, "Unable to acquire lock")
}

// Get the Subscription supporting the OperationalIntent, if one is defined
var previousSubscription *scdmodels.Subscription
if old.SubscriptionID != nil {
Expand Down

0 comments on commit 7de59f6

Please sign in to comment.