326
creationParams *creationParams,
327
currentWorkflowConditionFailed *persistence.CurrentWorkflowConditionFailedError,
328
>
) (*historyservice.StartWorkflowExecutionResponse, StartOutcome, error) {
api.go
329
>
// CurrentWorkflowConditionFailedError is built from the persisted WorkflowExecutionState blob,
330
>
// which may not yet carry first_execution_run_id on workflows persisted before that field
331
>
// existed. In that case, load mutable state once to recover the canonical head-of-chain run id
332
>
// (which checks ExecutionState, then ExecutionInfo, then the WorkflowExecutionStarted event).
333
>
if currentWorkflowConditionFailed.FirstExecutionRunID == "" && currentWorkflowConditionFailed.RunID != "" {
334
if info, err := s.getMutableStateInfo(ctx, currentWorkflowConditionFailed.RunID); err == nil {
335
currentWorkflowConditionFailed.FirstExecutionRunID = info.firstExecutionRunID
336
}
337
}
338
>
request := s.request.StartRequest
api.go
339
>
currentWorkflowRequestIDs := currentWorkflowConditionFailed.RequestIDs
340
>
if requestIDInfo, ok := currentWorkflowRequestIDs[request.GetRequestId()]; ok {
341
metrics.StartWorkflowRequestDeduped.With(s.getMetricsHandler()).Record(1)
342