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

Adds a retryable error for when we try to delete open executions #3405

Merged

Conversation

MichaelSnowden
Copy link
Contributor

Adds a retryable error for when we try to delete open executions. This was requested by @yycptt since we want a longer retry delay for this type of error.

@MichaelSnowden MichaelSnowden marked this pull request as ready for review September 18, 2022 19:17
@MichaelSnowden MichaelSnowden requested a review from a team as a code owner September 18, 2022 19:17
@yux0
Copy link
Contributor

yux0 commented Sep 20, 2022

what is the case we will delete a open execution from transfer task?

service/history/queues/executable.go Outdated Show resolved Hide resolved
service/history/queues/executable.go Outdated Show resolved Hide resolved
Comment on lines 262 to 268
if err == consts.ErrTaskRetry || err == consts.ErrDeleteOpenExec {
e.taggedMetricsHandler.Counter(TaskStandbyRetryCounter).Record(1)
Copy link
Member

Choose a reason for hiding this comment

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

We don't want the TaskStandbyRetryCounter metric get emitted when encountering the task not completed error. Probably define a new counter metric for this error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a new counter metric.

service/history/queues/executable.go Outdated Show resolved Hide resolved
@MichaelSnowden
Copy link
Contributor Author

what is the case we will delete a open execution from transfer task?

It looks like there are a lot of places workflow close tasks are generated, like when it fails, times out, or completes. I think the race condition is when one of those tasks is generated, and the user simultaneously calls DeleteWorkflowExecution and the delete task is made too, so this ensures that the close task finishes before the delete task, if there is any pending close task.

However, I'm not really sure--I'm just copying the logic from delete_manager, which had this check.

common/util.go Outdated Show resolved Hide resolved
@MichaelSnowden MichaelSnowden merged commit c672c37 into temporalio:master Sep 20, 2022
@MichaelSnowden MichaelSnowden deleted the err-delete-open-exec branch September 20, 2022 19:08
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

3 participants