Skip to content

Commit

Permalink
Fix describeWorkflowExecution in passive cluster (#4203)
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt committed May 19, 2021
1 parent 94a0991 commit d55f707
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions service/history/historyEngine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1491,9 +1491,11 @@ func (e *historyEngineImpl) DescribeWorkflowExecution(
}
result.WorkflowExecutionInfo.ParentDomainID = common.StringPtr(executionInfo.ParentDomainID)
result.WorkflowExecutionInfo.ParentInitiatedID = common.Int64Ptr(executionInfo.InitiatedID)
if entry, err := e.shard.GetDomainCache().GetActiveDomainByID(executionInfo.ParentDomainID); err == nil {
result.WorkflowExecutionInfo.ParentDomain = common.StringPtr(entry.GetInfo().Name)
parentDomain, err := e.shard.GetDomainCache().GetDomainName(executionInfo.ParentDomainID)
if err != nil {
return nil, err
}
result.WorkflowExecutionInfo.ParentDomain = common.StringPtr(parentDomain)
}
if executionInfo.State == persistence.WorkflowStateCompleted {
// for closed workflow
Expand Down

0 comments on commit d55f707

Please sign in to comment.