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

Fix potential deadlock in shard addTask #2823

Merged
merged 4 commits into from
May 10, 2022
Merged

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented May 10, 2022

What changed?

  • Do not hold shard lock when calling historyEngine.NotifyNewTask, as the notify method may try to lock the shard again.
  • This will happen when trying to add task for standby workflows. When notifying task to standby timer queue, the logic will try to lock shard again to get standby cluster time.

Why?

  • Fix deadlock

How did you test it?

Potential risks

Is hotfix candidate?

@yycptt yycptt requested a review from a team as a code owner May 10, 2022 00:08
@yycptt yycptt merged commit bffb755 into temporalio:master May 10, 2022
@yycptt yycptt deleted the fix-addTask branch May 10, 2022 02:02
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