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

Add version check for delete workflow transfer task #3159

Merged
merged 11 commits into from
Aug 3, 2022

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Jul 27, 2022

What changed?

  1. Add version check for delete workflow transfer task.
  2. Add delete closed workflow only flag.
  3. Skip version check when deleteAfterClosed is true.

Why?
We want to use the API in Archival to delete workflow data and it requires version.

How did you test it?
Unit test

Potential risks

Is hotfix candidate?

@yux0 yux0 requested a review from alexshtin July 27, 2022 21:40
service/history/replication/task_processor.go Outdated Show resolved Hide resolved
version := currentVersion
if deleteAfterClose {
// Ignore version check when delete request is from user API
version = common.EmptyVersion
Copy link
Member

Choose a reason for hiding this comment

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

I think this will cause the version check for close execution task to always fail and task being skipped when deleting an open workflow in a global namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I think it don't need special handling for deleteAfterClose case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current implementation do check version when delete open workflow(deleteAfterClose = true). Is this expected? @alexshtin

@yux0 yux0 marked this pull request as ready for review July 28, 2022 17:06
@yux0 yux0 requested a review from a team as a code owner July 28, 2022 17:06
service/frontend/operator_handler.go Outdated Show resolved Hide resolved
service/history/transferQueueActiveTaskExecutor.go Outdated Show resolved Hide resolved
service/history/transferQueueTaskExecutorBase.go Outdated Show resolved Hide resolved
@yux0 yux0 enabled auto-merge (squash) August 3, 2022 20:51
@yux0 yux0 merged commit ab56cdf into temporalio:master Aug 3, 2022
@yux0 yux0 deleted the delete-version-check branch August 3, 2022 21:23
yycptt pushed a commit that referenced this pull request Aug 12, 2022
* Add version check to delete workflow transfer task
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.

4 participants