Skip to content

Commit 20e0f31

Browse files
committed
fix merge
1 parent db8ad64 commit 20e0f31

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

chasm/lib/nexusoperation/operation.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ func (o *Operation) RequestCancel(
140140
ctx chasm.MutableContext,
141141
req *nexusoperationpb.CancellationState,
142142
) error {
143-
if !TransitionCanceled.Possible(o) {
144-
return ErrOperationAlreadyCompleted
145-
}
146-
147143
if existingCancellation, ok := o.Cancellation.TryGet(ctx); ok {
148144
existingReqID := existingCancellation.GetRequestId()
149145
newReqID := req.GetRequestId()
@@ -183,7 +179,7 @@ func (o *Operation) Terminate(
183179
return chasm.TerminateComponentResponse{}, nil
184180
}
185181

186-
return chasm.TerminateComponentResponse{}, TransitionTerminated.Apply(o, ctx, EventTerminated{TerminateComponentRequest: req})
182+
return chasm.TerminateComponentResponse{}, TransitionTerminated.Apply(o, ctx, EventTerminated{req})
187183
}
188184

189185
// SearchAttributes implements chasm.VisibilitySearchAttributesProvider interface.

chasm/lib/nexusoperation/operation_statemachine.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ var TransitionTerminated = chasm.NewTransition(
213213
nexusoperationpb.OPERATION_STATUS_SCHEDULED,
214214
nexusoperationpb.OPERATION_STATUS_STARTED,
215215
nexusoperationpb.OPERATION_STATUS_BACKING_OFF,
216-
nexusoperationpb.OPERATION_STATUS_CANCELED,
217216
},
218217
nexusoperationpb.OPERATION_STATUS_TERMINATED,
219218
func(o *Operation, ctx chasm.MutableContext, event EventTerminated) error {

0 commit comments

Comments
 (0)