Skip to content

Commit f6d319a

Browse files
authored
Fix MutableSideEffect (#540)
1 parent 4264f35 commit f6d319a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

internal/internal_task_handlers.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,11 @@ ProcessEvents:
668668
respondEvents = append(respondEvents, event)
669669
}
670670

671+
if isPreloadMarkerEvent(event) {
672+
// marker events are processed separately
673+
continue
674+
}
675+
671676
// Any pressure points.
672677
err := w.wth.executeAnyPressurePoints(event, isInReplay)
673678
if err != nil {
@@ -745,7 +750,9 @@ func (w *workflowExecutionContextImpl) CompleteDecisionTask(waitLocalActivities
745750
if w.currentDecisionTask == nil {
746751
return nil
747752
}
748-
if w.hasPendingLocalActivityWork() {
753+
// w.laTunnel could be nil for worker.ReplayHistory() because there is no worker started, in that case we don't
754+
// care about the pending local activities, and just return because the result is ignored anyway by the caller.
755+
if w.hasPendingLocalActivityWork() && w.laTunnel != nil {
749756
if len(w.eventHandler.unstartedLaTasks) > 0 {
750757
// start new local activity tasks
751758
for activityID := range w.eventHandler.unstartedLaTasks {

0 commit comments

Comments
 (0)