Skip to content

Commit

Permalink
Bugfix: missing error check when allocating task IDs for timer tasks (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
lihannan99 authored and yiminc committed Nov 15, 2018
1 parent bcd373f commit 5100907
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions service/history/shardContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,10 @@ func (s *shardContextImpl) CreateWorkflowExecution(request *persistence.CreateWo

defer s.updateMaxReadLevelLocked(transferMaxReadLevel)

s.allocateTimerIDsLocked(request.TimerTasks, request.DomainID, request.Execution.GetWorkflowId())
err := s.allocateTimerIDsLocked(request.TimerTasks, request.DomainID, request.Execution.GetWorkflowId())
if err != nil {
return nil, err
}

Create_Loop:
for attempt := 0; attempt < conditionalRetryCount; attempt++ {
Expand Down Expand Up @@ -488,7 +491,10 @@ func (s *shardContextImpl) UpdateWorkflowExecution(request *persistence.UpdateWo
}
defer s.updateMaxReadLevelLocked(transferMaxReadLevel)

s.allocateTimerIDsLocked(request.TimerTasks, request.ExecutionInfo.DomainID, request.ExecutionInfo.WorkflowID)
err = s.allocateTimerIDsLocked(request.TimerTasks, request.ExecutionInfo.DomainID, request.ExecutionInfo.WorkflowID)
if err != nil {
return nil, err
}

Update_Loop:
for attempt := 0; attempt < conditionalRetryCount; attempt++ {
Expand Down

0 comments on commit 5100907

Please sign in to comment.