Skip to content

Commit

Permalink
Retry with heartbeat progress (cadence-workflow#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminc authored Sep 7, 2018
1 parent 63b5612 commit f805d2d
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gen/go/history/idl.go

Large diffs are not rendered by default.

39 changes: 37 additions & 2 deletions .gen/go/history/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .gen/go/shared/idl.go

Large diffs are not rendered by default.

38 changes: 36 additions & 2 deletions .gen/go/shared/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions idl/github.com/uber/cadence/history.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ struct RecordActivityTaskStartedResponse {
30: optional i64 (js.type = "Long") startedTimestamp
40: optional i64 (js.type = "Long") attempt
50: optional i64 (js.type = "Long") scheduledTimestampOfThisAttempt
60: optional binary heartbeatDetails
}

struct RecordDecisionTaskStartedRequest {
Expand Down
1 change: 1 addition & 0 deletions idl/github.com/uber/cadence/shared.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ struct PollForActivityTaskResponse {
110: optional i32 heartbeatTimeoutSeconds
120: optional i32 attempt
130: optional i64 (js.type = "Long") scheduledTimestampOfThisAttempt
140: optional binary heartbeatDetails
}

struct RecordActivityTaskHeartbeatRequest {
Expand Down
1 change: 1 addition & 0 deletions service/history/historyEngine.go
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ func (e *historyEngineImpl) RecordActivityTaskStarted(ctx context.Context,

response.StartedTimestamp = common.Int64Ptr(ai.StartedTime.UnixNano())
response.Attempt = common.Int64Ptr(int64(ai.Attempt))
response.HeartbeatDetails = ai.Details

// Start a timer for the activity task.
timerTasks := []persistence.Task{}
Expand Down
1 change: 1 addition & 0 deletions service/matching/matchingEngine.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ func (e *matchingEngineImpl) createPollForActivityTaskResponse(context *taskCont

response.TaskToken, _ = e.tokenSerializer.Serialize(token)
response.Attempt = common.Int32Ptr(int32(token.ScheduleAttempt))
response.HeartbeatDetails = historyResponse.HeartbeatDetails
return response
}

Expand Down

0 comments on commit f805d2d

Please sign in to comment.