Skip to content

[13.x] Avoid cross-slot reads when checking paused queues - #61139

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
lazerg:fix/issue-61138-cross-slot-pause-check
Aug 12, 2026
Merged

taylorotwell merged 1 commit into
laravel:13.xfrom
lazerg:fix/issue-61138-cross-slot-pause-check

Conversation

@lazerg

@lazerg lazerg commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Since #61126, getPausedQueues() fetches the global pause key in the same many() call as the per-queue pause keys. On a Redis cache store that becomes a single MGET over keys that hash to different slots, so any backend with cluster semantics (Redis Cluster, ElastiCache Serverless) replies with CROSSSLOT Keys in request don't hash to the same slot. phpredis signals that by returning false, which PhpRedisConnection::mget() then passes to array_map(), so the worker sees a TypeError on every poll and stops consuming jobs. isPaused() batches the two kinds of keys the same way.

This reads the global key on its own and batches only the per-queue keys, so a worker polling a single queue is back to reading one key at a time and queues keep running on those backends.

Fixes #61138

@lazerg
lazerg force-pushed the fix/issue-61138-cross-slot-pause-check branch from 71ef6e7 to e15d92d Compare August 11, 2026 20:26
@jackbayliss

jackbayliss commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Ye this should work, didn't know about the CROSSSLOT cluster issue :(

Kinda wonder if many() should account for that in the case of PhpRedisConnection

@taylorotwell
taylorotwell merged commit 4839d21 into laravel:13.x Aug 12, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants