If the queue total never reaches 0 then the "total" state data can become incorrect, incorrectly triggering the safety message.

Created on 27 November 2017, about 7 years ago
Updated 16 May 2023, over 1 year ago

In AcquiaPurgeEfficientQueue when an item gets released, no effort is made to decrement the total number of items from the total number of items stored in the queue state. It looks like in AcquiaPurgeService.php that it's intended on getting reset here:

    // When the bottom of the queue has been reached, reset all state data.
    if ($this->queue()->numberOfItems() === 0) {
      $this->state()->wipe();
    }

This differs from the implementation of AcquiaPurgeSmartQueue where the items are explicitly in the expireQueueItems() method:

  $this->total()->decrease($deleted_items);

At a glance, this appears to means that if the cron doesn't run enough or the queue simply gets backed up that the state will never get wiped out if the process doesn't get to 0. Therefore, the number of items added to the qtotal state value will never get wiped/reset. Even though my queue state currently shows that there are over 36,000 items in the queue, in the actual queue table itself there are only 4000 or so items.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nvahalik

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024