antirez / antirez/disque

Received duplicated jobs

オープン
#192 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
8.1k
フォーク
532
PR マージ指標
30日以内にマージされた PR はありません

説明

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](https://cloud.githubusercontent.com/assets/18436286/19637073/aefda7de-99ff-11e6-943e-7ff96c1d7fc2.png)
5.The disque client i used is spinach

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。