- Issue created by @chfoidl
- Merge request !165Issue #3498190 by chfoidl: Implement lock to avoid token request race conditions → (Merged) created by chfoidl
- 🇦🇹Austria chfoidl Salzburg
In case anyone needs this for the current 6.0.0-beta8, attached is a patch file with the backported merge request changes.
- 🇳🇱Netherlands bojan_dev
Thanks for sharing this @chfoidl, I dropped some comments and I wonder if it's even possible to have test coverage for this.
- 🇦🇹Austria chfoidl Salzburg
Thank you @bojan_dev for looking into this and for pointing out various improvements.
The MR was updated accordingly.In regards to testing it is indeed very difficult because this issue only happens when simultaneous requests are handled by different PHP threads, as is the case when using e.g. PHP-FPM.
Unfortunately the built-in PHP web server seems to handle requests sequentially, therefore this issue never happens.
However passing all existing tests show that the changes do not break existing behavior.
What I have done is manually apply the changes to a local Drupal installation using DDEV and running the script from the issue description to make sure the locking works as intended.
-
bojan_dev →
committed 61d12c0f on 6.0.x authored by
chfoidl →
Issue #3498190 by chfoidl: Implement lock to avoid token request race...
-
bojan_dev →
committed 61d12c0f on 6.0.x authored by
chfoidl →
Automatically closed - issue fixed for 2 weeks with no activity.