Skip to content

Commit

Permalink
Merge pull request #2053 from sawsa307/cherry-pick-#2051-to-release-1.22
Browse files Browse the repository at this point in the history
[Cherry pick #2051] Fix syncLock deadlock
  • Loading branch information
k8s-ci-robot authored Mar 31, 2023
2 parents 0b02f5f + b1dea8f commit c49e853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/neg/syncers/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ func (s *transactionSyncer) operationInternal(operation transactionOp, zone stri
s.recordEvent(apiv1.EventTypeWarning, operation.String()+"Failed", fmt.Sprintf("Failed to %s %d network endpoint(s) (NEG %q in zone %q): %v", operation.String(), len(networkEndpointMap), s.NegSyncerKey.NegName, zone, err))
if valid, reason := s.isValidEPBatch(err, operation, networkEndpoints); !valid {
s.syncLock.Lock()
defer s.syncLock.Unlock()
s.setErrorState(reason)
s.syncLock.Unlock()
}
}

Expand Down

0 comments on commit c49e853

Please sign in to comment.