Skip to content

6.11.3

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 10 Sep 17:34
· 1 commit to 6.x 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. Backport of the fix released in 8.2.1 and 7.6.1; this is the line service-catalog (rollun-callback 6.11.x) runs on.
  • 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.
  • No other changes since 6.11.2. Verified on PHP 7.2 and 7.4 against MySQL 8.0; the regression test fails on 6.11.2 and passes here.