Issue summary (paste under each heading)
Problem/Motivation
PathautoGenerator::createEntityAlias() performs the uniqueness check and the alias insert as two separate, non‑atomic steps:
- the check — AliasUniquifier::uniquify() → isReserved() — is a plain SELECT (AliasManager::getPathByAlias()), with no lock;
- the write — AliasStorageHelper::save() — inserts the path_alias row afterwards.
There is no lock between them and no UNIQUE constraint on the path_alias table (see #2350135). When two entities that produce the same base alias are saved in near‑simultaneous requests
(normal on multi‑worker / multi‑server setups), both requests pass the uniqueness check before either inserts, so both receive the identical alias with no numeric suffix. Because alias
resolution returns the most recently created match, the older entity's link then resolves to the newer entity (wrong content).
| Comment | File | Size | Author |
|---|---|---|---|
| pathauto-alias-race-lock.patch | 5.75 KB | ssawafta |
Comments
Comment #2
berdirproposed changes need to be done as merge requests. Did you actually run into such a race condition or is just based on (AI?) code analysis?