Repository navigation
Payload 4.0 stable timeline, and backport of the atomic job claim (#17441) to 3.x? #18614
Replies: 3 comments
|
For the interim v3 setup, I would keep one active runner per queue and prevent overlapping run calls. That is a mitigation for this claim race, not an exactly-once guarantee or an official release recommendation. A single process can still overlap two cron/manual/API-triggered runs, and a rolling deployment can temporarily have both old and new runner replicas alive. Your source-level diagnosis matches the MongoDB adapter in v3.90.2. In the limited, non-ID path, it finds candidate IDs, replaces the query with an PR #17441 is useful here because its MongoDB fix still uses find/update/find. The difference is ownership: a conditional claim writes a unique Until you have a released fix validated for your version, I would check:
A I can't give a 4.0 stable date or confirm a v3 backport commitment; those need a maintainer response. I reviewed the released source and the merged PR, but have not run your deployment or a MongoDB concurrency reproduction. |
|
Hi @community! For multi-runner queues hitting the non-atomic Workaround Until BackportedPR #17441 switches the MongoDB claim from three steps ( While waiting for the 3.x patch release:
|
|
Short version for your three questions. It is based on reading this thread, #17441, #18565 and #18709. I haven't reproduced it myself, so treat it as a code-reading diagnosis. Timeline / backport. I can't give you a 4.0 date, and I don't see a maintainer commitment to a 3.x release in the threads. The work is actually happening in #18565 (the 3.x backport request) and in the community PR #18709 targeting On how #17441 works (the two earlier answers here disagree). It is not a single Is one runner per queue enough until then? It shrinks the window but does not close it. The race is not only between replicas: anything that triggers a run while another run is in flight can overlap. That includes What I would do on 3.x until a fix ships. (a) Use exactly one trigger per queue ( None of this gives exactly-once; it makes the duplicate harmless while the claim fix lands. If you want an independent test of this boundary, we run a fixed-scope 100 EUR triage with a written PASS/FAIL finding: https://clawguard-teal.vercel.app/clawguard/landing.html (Drafted with an AI assistant, Claude.) |
Uh oh!
There was an error while loading. Please reload this page.
We run Payload 3.x jobs with more than one runner on the same queue and hit the non-atomic job claim:
updateJobsin@payloadcms/db-mongodbclaims a job in three steps (find → updateMany → find), so two runners can claim and run the same job. For now we limit ourselves to a single runner.#17441 (feat!: support multiple workers on the same queue) fixes this, but it is only in 4.0, which has canary builds only.
findOneAndUpdateforlimit: 1? It fixes a correctness bug (duplicate job runs), not a new feature.Thanks!
All reactions