Skip to content

8.2.1

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 09 Sep 12:42
· 1 commit to master since this release
  • Fixed a race in Queues\Adapter\DbAdapter::getMessages() that could hand the same message to two consumers at once (Trello nIjO2cqy). Candidate ids were prefetched without a lock and then claimed with FOR UPDATE SKIP LOCKED, which only skips rows still held by an open transaction — a competing consumer that had already claimed and committed one of those ids got it delivered a second time, and receive_count was bumped twice. The availability conditions (time_in_flight, delayed_until, receive_count, priority) are now re-evaluated inside the locking read, which is also ordered by added_at so the oldest candidates are taken first.
  • Note for queues on DbAdapter: the default timeInflight is 0, which makes a claimed message visible again after 1 s regardless of this fix. Set a meaningful timeInflight if a message must not be redelivered while it is being processed.
  • Code brought in line with rector 2.6.6 (??= rewrites) so the PHP 8.1 check passes again — no behaviour change.