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

Received duplicated jobs #192

Open
LMig2k opened this issue Oct 24, 2016 · 0 comments
Open

Received duplicated jobs #192

LMig2k opened this issue Oct 24, 2016 · 0 comments

Comments

@LMig2k
Copy link

LMig2k commented Oct 24, 2016

This is the steps i took.

  1. Start disque-server with one node only.
  2. Adding 10000 jobs with RETRY 300 seconds to the que_0 one by one in a single thread. When a job is added, a record(job id, create time) is inserted in the mysql db.
  3. Another process get the jobs from the que_0 one by one in a single thread.
    When a job is gotten, The sql is executed:
    update queue set executeStartTime = :now, executeStartTimeStr = CONCAT(executeStartTimeStr, :nowStr) where jobId = :jobId

Then the job will be acked, the sql executed:
update queue set ack = ack + 1, endTime = :now, executeEndTimeStr = CONCAT(executeEndTimeStr, :nowStr) where jobId = :jobId
The time between the job is got and acked is less than 30 seconds.
4. After all the 10000 jobs are added and gotted, the result is:
9997 jobs with one time and 3 duplicated jobs got.

select * from queue where ack=2, got the following results:

image
5.The disque client i used is spinach

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

No branches or pull requests

1 participant