Skip to content

Commit 4f7fc9c

Browse files
committed
Evict execution context from cache when there is no workflow defination found.
1 parent 692cd28 commit 4f7fc9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/internal_task_handlers.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,10 @@ func (wth *workflowTaskHandlerImpl) ProcessWorkflowTask(
616616

617617
workflowContext, err := wth.getOrCreateWorkflowContext(task, historyIterator)
618618
if err != nil {
619+
// The WorkflowContext will be removed from the cache if an error is found
620+
// in workflowContext.err when calling Unlock() method.
621+
workflowContext.err = err
622+
defer workflowContext.Unlock()
619623
return nil, nil, err
620624
}
621625
defer workflowContext.Unlock()

0 commit comments

Comments
 (0)