diff --git a/core/lib/Drupal/Core/Lock/PersistentDatabaseLockBackend.php b/core/lib/Drupal/Core/Lock/PersistentDatabaseLockBackend.php index 514967b..f14f87a 100644 --- a/core/lib/Drupal/Core/Lock/PersistentDatabaseLockBackend.php +++ b/core/lib/Drupal/Core/Lock/PersistentDatabaseLockBackend.php @@ -24,11 +24,13 @@ class PersistentDatabaseLockBackend extends DatabaseLockBackend { * The database connection. */ public function __construct(Connection $database) { - // This simply overrides the parent constructor, to not have it register - // releaseAll() as a shutdown function. + // Do not call the parent constructor to avoid registering a shutdown + // function that releases all the locks at the end of a request. $this->database = $database; // Set the lockId to a fixed string to make the lock ID the same across - // multiple requests. + // multiple requests. The lock ID is use as a page token to relate all the + // locks set during a request to each other. + // @see \Drupal\Core\Lock\LockBackendInterface::getLockId() $this->lockId = 'persistent'; } }