Skip to content

Commit

Permalink
Relax heartbeat timer check to allow heartbeats with incorrect IDs (#670
Browse files Browse the repository at this point in the history
)

PR #658 fixes an issue with heartbeat timers which require us to use
activity scheduleID in the timertask.  This change modifies the
heartbeat timer creation check to account for incorrect heartbeat timer
tasks created before the bugfix.
  • Loading branch information
samarabbas authored Apr 16, 2018
1 parent be357d4 commit 1662b25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion service/history/timerQueueActiveProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ Update_History_Loop:
// if current one is HB task and we need to create next HB task for the same.
// NOTE: When record activity HB comes in we only update last heartbeat timestamp, this is the place
// where we create next timer task based on that new updated timestamp.
if !td.TaskCreated || (isHeartBeatTask && td.EventID == scheduleID) {
// REMOVE IN NEXT RELEASE: PR #658 fixes an issue with heartbeat timers which require us to use scheduleID
// for activity in the timertask. But we still need to check if the ID matches Started eventID or
// bufferedEventID due to the heartbeat timers created before the bugfix.
if !td.TaskCreated || (isHeartBeatTask && (scheduleID == td.EventID || scheduleID == ai.StartedID ||
scheduleID == bufferedEventID)) {
nextTask := tBuilder.createNewTask(td)
timerTasks = []persistence.Task{nextTask}
at := nextTask.(*persistence.ActivityTimeoutTask)
Expand Down

0 comments on commit 1662b25

Please sign in to comment.