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

Improve task processing retry behavior #3218

Merged
merged 4 commits into from
Aug 12, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Aug 12, 2022

What changed?

  • Allow task to be re-submitted (put to the end of the task channel) upon resource exhausted errors
    (Persistence will prioritize frontend/API requests anyway, so this won't be an issue. )
  • Reduce initial task reschedule interval, as now the task rescheduling is triggered based on needs, not periodically. Also reduced resubmitMaxAttempts now that the initial task rescheduling interval is reduced.
  • Use different reschedule policy for ErrTaskRetry, which can only be resolve by waiting for replication to happen.

Why?

  • Previous penalty for task processing upon resource exhausted error seems too high and greatly increased the task latency (after removing all the retries during task processing, done by the simplify retry PR).

How did you test it?

  • Tested in test cluster

Potential risks

Is hotfix candidate?

  • Yes.

@yycptt yycptt requested a review from yiminc August 12, 2022 00:03
@yycptt yycptt requested a review from a team as a code owner August 12, 2022 00:03
@@ -377,13 +378,26 @@ func (e *executableImpl) shouldResubmitOnNack(attempt int, err error) bool {
return false
Copy link
Member

Choose a reason for hiding this comment

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

update the comment as well as there is no periodic rescheduling

@yycptt yycptt enabled auto-merge (squash) August 12, 2022 00:21
@yycptt yycptt merged commit 55e50fb into temporalio:master Aug 12, 2022
@yycptt yycptt deleted the improve-task-retry branch August 12, 2022 17:56
yycptt added a commit that referenced this pull request Aug 12, 2022
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