-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Mutex not being released on step completion #4847
Changes from all commits
437860a
93e0573
047da43
b902322
cd6a60b
c9a0838
92c969b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1702,6 +1702,9 @@ func (woc *wfOperationCtx) executeTemplate(ctx context.Context, nodeName string, | |
woc.computeMetrics(processedTmpl.Metrics.Prometheus, localScope, realTimeScope, false) | ||
} | ||
} | ||
if processedTmpl.Synchronization != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node status will be calculated here for retry nodes. The lock has to be released if the node is fulfilled |
||
woc.controller.syncManager.Release(woc.wf, node.ID, processedTmpl.Synchronization) | ||
} | ||
return retryParentNode, nil | ||
} | ||
lastChildNode := getChildNodeIndex(retryParentNode, woc.wf.Status.Nodes, -1) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,6 +155,7 @@ func (cm *Manager) Release(wf *wfv1.Workflow, nodeName string, syncRef *wfv1.Syn | |
|
||
if syncLockHolder, ok := cm.syncLockMap[lockName.EncodeName()]; ok { | ||
syncLockHolder.release(holderKey) | ||
syncLockHolder.removeFromQueue(holderKey) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mainly for edge cases to avoid the release node shouldn't be in pending state. |
||
log.Debugf("%s sync lock is released by %s", lockName.EncodeName(), holderKey) | ||
lockKey := lockName.EncodeName() | ||
wf.Status.Synchronization.GetStatus(syncRef.GetType()).LockReleased(holderKey, lockKey) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate lines