Review main Merged

96714[BUGFIX] Flush the runtime cache after a worker handled a message

Wolfgang Klinger CR +2 V +2 Normal +141 −6 updated 11/14/26, 09:23

Commit message

DoctrineCloseConnectionMiddleware closes the database connections
after a worker handled a message, but the runtime cache is left
alone. It is meant to live for one request and can hold data bound
to a connection: BackendUtility::getPageForRootline() keeps a
prepared statement there. The next message handled by the same
worker runs that statement on the closed connection and fails with
"MySQL server has gone away". With the default retry strategy the
message is retried and then dropped, so the queue looks processed
although the messages were not.

The middleware now flushes the runtime cache together with closing
the connections, so a worker treats each message like a request.
This also drops page rows and rootlines cached by the previous
message, which would otherwise be stale.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 7

Review log 56

  1. Wolfgang Klinger uploaded patch set 1 10/15/26, 11:27

  2. core-ci voted on patch set 1 V +1 10/15/26, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111183

  3. Simon Schaufelberger voted on patch set 1 CR +1 V +1 10/15/26, 11:47

  4. Benni Mack commented on patch set 1 CR +2 V +2 11/14/26, 09:23

    we're in the process of avoiding getPageForRootline as well, so this issue won't happen anymore (in this place).
  5. Benni Mack merged patch set 2 11/14/26, 09:23

  6. Benni Mack commented on patch set 2 11/14/26, 09:23

    Reply

    Done