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] Deleted tasks are preventing new tasks from being enqueued #275

Closed
nilam-sorathia opened this issue Jun 4, 2021 · 5 comments · Fixed by #276
Closed

[BUG] Deleted tasks are preventing new tasks from being enqueued #275

nilam-sorathia opened this issue Jun 4, 2021 · 5 comments · Fixed by #276
Assignees
Labels
bug Something isn't working

Comments

@nilam-sorathia
Copy link

nilam-sorathia commented Jun 4, 2021

Describe the bug
When a unique task is scheduled and then subsequently deleted with an outstanding ttl, that task prevents a new task from being enqueued until the ttl expires.

Note: the task was deleted using Asynqmon

To Reproduce

  1. Schedule a task in an hour with any payload with unique option (ttl: long enough to reproduce the bug, eg. 2 minutes)
  2. Using Asynqmon, confirm the task is in scheduled state
  3. Select the task using the Asynqmon UI and delete the task
  4. Schedule a new task with the same payload and params (unique, processedIn, queue, etc..) before the ttl of the prior task would have expired
  5. Receive duplicate task error

Expected behavior
When a task is deleted, the unique constraint of a new task should not conflict with the deleted task regardless if the deleted task's unique ttl is still outstanding. Instead the new task should be to be enqueued/scheduled without error.

Environment

  • OS: [MacOS, Linux]
  • Version of asynq package
    asynq: v0.16.0
    asynqmon: v0.1-beta1
@nilam-sorathia nilam-sorathia added the bug Something isn't working label Jun 4, 2021
@hibiken
Copy link
Owner

hibiken commented Jun 5, 2021

@nilam-sorathia Thank you for reporting this bug! I completely overlooked this, I'll fix this in the next few days.
Thank you again for spotting and reporting this bug 🙏

@nilam-sorathia
Copy link
Author

Thank you for the quick reply. We appreciate your investment in this library and we plan on depending on it more. Would you please update this thread on whether the fix will be in asynq or asynqmon. Thank you @hibiken

@hibiken
Copy link
Owner

hibiken commented Jun 6, 2021

The main fix is going to be in this asynq repo, but we'll also need to update the dependency version in asynqmon repo as well. I'll make sure to close this issue when both of these are addressed 👍

@hibiken
Copy link
Owner

hibiken commented Jun 6, 2021

The bug is fixed now. Upgrading to the latest version 0.1-beta2 of asynqmon should fix the issue 👍
Please let me know if you are still seeing the bug!

@hibiken hibiken closed this as completed Jun 6, 2021
@nilam-sorathia
Copy link
Author

@hibiken Very much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants