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

[BUG] Concurrency Issue in BulkDispatchWorkflows Activity Prevents Completion #5417

Closed
sfmskywalker opened this issue May 21, 2024 · 2 comments · Fixed by #5418 or #5425
Closed

[BUG] Concurrency Issue in BulkDispatchWorkflows Activity Prevents Completion #5417

sfmskywalker opened this issue May 21, 2024 · 2 comments · Fixed by #5418 or #5425
Assignees
Labels
bug Something isn't working elsa 3 This issue is specific to Elsa 3
Milestone

Comments

@sfmskywalker
Copy link
Member

Summary

The BulkDispatchWorkflows activity fails to complete due to a concurrency issue introduced during an update. This issue arises when updating the workflow instance to store workflow input before sending a message to the service bus.

Problem

When we implemented support for storing workflow input with the workflow instance to prevent large message sizes, we inadvertently created a situation where multiple threads could attempt to update the workflow instance state simultaneously. This lack of thread synchronization has led to the BulkDispatchWorkflows activity failing to complete.

Solution

To resolve this issue, we need to acquire a distributed lock on the workflow instance before updating it with the input. This will ensure that only one thread can update the workflow instance at a time, preventing concurrency conflicts.

@sfmskywalker sfmskywalker added bug Something isn't working elsa 3 This issue is specific to Elsa 3 labels May 21, 2024
@sfmskywalker sfmskywalker added this to the Elsa 3.2 milestone May 21, 2024
@sfmskywalker sfmskywalker self-assigned this May 21, 2024
@elsa-workflows elsa-workflows deleted a comment from glime-ai bot May 21, 2024
@sfmskywalker
Copy link
Member Author

This issue still exists.

@sfmskywalker sfmskywalker reopened this May 22, 2024
@sfmskywalker
Copy link
Member Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working elsa 3 This issue is specific to Elsa 3
Projects
Status: Done
1 participant