Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle activity retry timer in passive #2640

Merged
merged 8 commits into from Mar 25, 2022
Merged

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Mar 23, 2022

What changed?
Handle activity retry timer in passive

Why?
Case: activity is retrying in source cluster and then failover to target cluster. We should persist the retry timer and handle the timer correctly.

How did you test it?
Unit tests

Potential risks

Is hotfix candidate?

@yux0 yux0 requested a review from a team as a code owner March 23, 2022 23:43
@@ -144,7 +144,7 @@ func (t *transferQueueStandbyTaskExecutor) processActivityTask(
}

if activityInfo.StartedId == common.EmptyEventID {
return newPushActivityToMatchingInfo(*activityInfo.ScheduleToStartTimeout), nil
return newPushActivityToMatchingInfo(activityInfo.TaskQueue, *activityInfo.ScheduleToStartTimeout), nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so activityInfo.TaskQueue always equals to task.TaskQueue? Do you happen to know why we persist the field in transfer tasks in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to task.TaskQueue

service/history/nDCActivityReplicator.go Outdated Show resolved Hide resolved
service/history/timerQueueStandbyTaskExecutor.go Outdated Show resolved Hide resolved
return nil, nil
}

if activityInfo.Attempt > task.Attempt {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize we have the same thing in timer active execution. But I am curious why we use > instead of ==?

@yux0 yux0 merged commit 12f4731 into temporalio:master Mar 25, 2022
@yux0 yux0 deleted the activity-retry branch March 25, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants