OptimalBits / bull

Premium Queue package for handling distributed jobs and messages in NodeJS.
Other
15.58k stars 1.43k forks source link

Bull parallel processing issue #2747

Closed devashishg closed 2 months ago

devashishg commented 5 months ago

There is one case we observed in our application, a job on parallel threads was removed and processed, and then on completion of the job, it was not deleted despite removeOnComplete being true.

In the end, redis had these two keys

  1. completed sorted set with this jobId,
  2. Job Hash object with {processedOn: 15:35:31.078, finishedOn: 15:35:31.099, returnvalue: {}}

Now onwards all the jobs we try to add with the same jobId, it does not work.

Someone, please explain what went wrong here! doesn't the lock prevent these parallel executions?

roggervalf commented 5 months ago

Hi @devashishg, which version are you using?

devashishg commented 5 months ago

@roggervalf 4.10.4

manast commented 5 months ago

@devashishg do you have a minimal example that reproduces the issue?

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.