Skip to content

Commit

Permalink
Don't fail ContinueAsNew command if parent namespace doesn't exist (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin committed Apr 26, 2022
1 parent ca586dd commit 02542f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions service/history/workflowTaskHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,9 @@ func (handler *workflowTaskHandlerImpl) handleCommandContinueAsNewWorkflow(
if handler.mutableState.HasParentExecution() {
parentNamespaceID := namespace.ID(handler.mutableState.GetExecutionInfo().ParentNamespaceId)
parentNamespaceEntry, err := handler.namespaceRegistry.GetNamespaceByID(parentNamespaceID)
if err != nil {
return err
if err == nil {
parentNamespace = parentNamespaceEntry.Name()
}
parentNamespace = parentNamespaceEntry.Name()
}

_, newStateBuilder, err := handler.mutableState.AddContinueAsNewEvent(
Expand Down

0 comments on commit 02542f9

Please sign in to comment.