Review main Merged

76224[TASK] Optimize FE page locking

Christian Kuhn CR +2 V +2 Normal +108 −103 updated 10/22/22, 10:03

Commit message

This is a clean up and optimization.

First, TSFE->lock does not need to be a multi
dimensional array anymore since the removal of
pagesection cache. This is simplified.

Also releaseLock() is useless since we're dealing
with only one lock-type since removal of pagesection
cache, so we merge it with public releaseLocks().

Additionally, acquireLock() now returns an
information if it got the lock immediately or had to
wait. Having this information, we can suppress a
cache->get() in case we got the lock immediately.

We mirror the acquire and release changes to class
ResourceMutex, which is codewise identical to the
methods from TSFE. We'll switch to this object in
TSFE with another patch.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 1215

  1. Christian Kuhn uploaded patch set 1 10/21/22, 17:42

  2. core-ci voted on patch set 1 V +1 10/21/22, 17:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32594

  3. Christian Kuhn uploaded patch set 2 10/21/22, 17:53

  4. core-ci voted on patch set 2 V +1 10/21/22, 18:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32595

  5. Andreas Kienast voted on patch set 2 CR +1 10/21/22, 19:35

  6. Stefan Bürk commented on patch set 2 CR -1 10/21/22, 19:47

    ResourceMutex.php:85

    Should be false as initial value to make sense

    ResourceMutex.php:99

    $hadToWaitForLock should be set here to true - as we are now going to to wait and try again (usleep + continue loop)
  7. Christian Kuhn commented on patch set 2 10/21/22, 20:02

    ResourceMutex.php:85 Reply

    oops. thx.

    ResourceMutex.php:99 Reply

    yeah. mixed that up since i renamed that property twice ... thx!
  8. Christian Kuhn uploaded patch set 3 10/21/22, 20:10

  9. Christian Kuhn commented on patch set 3 10/21/22, 20:10

    ResourceMutex.php:85 Reply

    Done

    ResourceMutex.php:99 Reply

    Done
  10. Stefan Bürk voted on patch set 3 V +1 CR +1 10/21/22, 20:12

  11. core-ci voted on patch set 3 V +1 10/21/22, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32599

  12. Markus Klein commented on patch set 3 10/22/22, 08:58

    ResourceMutex.php:100

    Param is still here
  13. Markus Klein commented on patch set 3 V +1 CR +1 10/22/22, 09:00

    ResourceMutex.php:100 Reply

    okay, we do not document those anymore as well. fine with me
  14. Christian Kuhn voted on patch set 3 V +2 CR +2 10/22/22, 10:03

  15. Christian Kuhn merged patch set 4 10/22/22, 10:03