On a high traffic site, when its time to restore the platform, performed in acquia_spi_boot(), if many processes in the same second hit acquia_spi_boot(), the variable_set will be called multiple times in that same second, worsening the effects of called variable_set (which shouldn't be called during hook_boot anyway!)

A nice an easy way around this is to simply obtain a lock before performing the task. Drupal's lock API drops the lock at the end of the process so no lock needs to be released as acquia_spi_boot's tasks technically don't need to be performed again for quite some time.

Attached is a patch for the fix.

CommentFileSizeAuthor
acquia_spi-lock-boot.patch1.34 KBJosh Waihi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, acquia_spi-lock-boot.patch, failed testing.

Stanislav Mixnovich’s picture

Assigned: Unassigned » Stanislav Mixnovich
Stanislav Mixnovich’s picture

Status: Needs work » Closed (fixed)