Review main Abandoned

60634[BUGFIX] Prevent page is being generated message being shown

Helmut Hummel CR 0 V 0 Easy +0 −3 updated 05/05/19, 10:59

Commit message

The reason this message is show for the second of two concurrent
requests is, that the pagesection lock is released after
pagesection cache is generated, but before page rendering
completed.

Since writing a temporary page cache is part of the
page cache generation, second request could hit
after the temporary cache has been written and pulling in
the temporary cache entry and delivering that to the client.

We now only release the pagesection lock 
after the page rendering completes, which means for the first
hit after empty caches all further requests wait until the
page rendering completed (and temporary cache is deleted and
replaced with the real cache entry), thus deliver the correct
cache entry.

This basically restores the locking behavior to a state
before TYPO3 7.6, where the additional release was introduced.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 1822

  1. Helmut Hummel uploaded patch set 1 04/30/19, 17:27

  2. TYPO3com voted on patch set 1 V +1 04/30/19, 17:40 Completed build in 13m 24s on Tue, 30 Apr, 07:40 PM Test Summary: 47475 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33672

  3. Richard Haeser commented on patch set 1 04/30/19, 17:49

    Wrong ticketnumber ;-)
  4. Markus Klein commented on patch set 1 04/30/19, 18:45

    Lets include the change to acquireLock into the patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/60307 and continue there.
  5. Richard Haeser updated the commit message in patch set 2 04/30/19, 18:51

  6. Richard Haeser commented on patch set 2 04/30/19, 18:51

    Just changed ticket number because it opened a SEO ticket again
  7. TYPO3com voted on patch set 2 V +1 04/30/19, 19:03 Completed build in 12m 16s on Tue, 30 Apr, 09:03 PM Test Summary: 47475 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33673

  8. Markus Klein commented on patch set 2 04/30/19, 21:30

    TypoScriptFrontendController.php:3763

    I think this is not needed. All calls are preceeded by exactly those checks, so this function should never be called.
  9. Helmut Hummel commented on patch set 2 05/01/19, 10:42

    TypoScriptFrontendController.php:3763 Reply Unresolved

    You are right
  10. Helmut Hummel uploaded patch set 3 05/01/19, 10:43

  11. TYPO3com voted on patch set 3 V +1 05/01/19, 10:58 Completed build in 14m 45s on Wed, 1 May, 12:58 PM Test Summary: 47475 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33681

  12. Oliver Klee voted on patch set 3 CR +1 05/02/19, 13:06

  13. Jigal van Hemert voted on patch set 3 CR +1 05/02/19, 21:25

  14. Markus Klein voted on patch set 3 V +1 CR +1 05/03/19, 06:51

  15. André Buchmann commented on patch set 3 V -1 05/03/19, 09:35

    I can still produce the message if I send 2-3 requests within a few milliseconds after clearing the cache.
  16. Markus Klein commented on patch set 3 CR 0 05/03/19, 10:29

    We should be more precise in the commit message. The message will still be shown if two requests hit for the exact same url
  17. Helmut Hummel commented on patch set 3 V -1 CR -1 05/03/19, 13:33

    > The message will still be shown if two requests hit for the exact same url Ah, true. My initial change was to NOT remove pagesection lock until the TYPO3 page is rendered. Now, if a second request comes to the point where pagesection lock is released and the first request already wrote the temporary cache entry, we will have the same situation like before. I will change the patch and the commit message accordingly
  18. Helmut Hummel uploaded patch set 4 05/03/19, 13:39

  19. Oliver Klee commented on patch set 4 05/03/19, 13:51

    Is the summary still correct?
    There's some trailing whitespace here.

    TypoScriptFrontendController.php:2650

    With the new version, where/when will the lock be released?
  20. TYPO3com voted on patch set 4 V +1 05/03/19, 13:52 Completed build in 13m 41s on Fri, 3 May, 03:52 PM Test Summary: 47473 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33707

  21. Helmut Hummel commented on patch set 4 05/05/19, 10:59

    I missed some important detail in my analysis. That is, that no lock is acquired, when a cache entry is found. This means, that once the first request that generates the page will have written the pagesection cache AND the temporary cache, all following requests will see the "page is being generated" message until the first request finishes rendering. So there is no other fix for this, than NOT writing the temporary cache entry. I therefore close this merge request in favor of https://review.typo3.org/#/c/Packages/TYPO3.CMS/+/60307/
  22. Helmut Hummel abandoned the change 05/05/19, 10:59