89179[!!!][BUGFIX] Prevent database deadlocks in Typo3DatabaseBackend::set()
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 4
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/79/89179/4 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/79/89179/4 && git cherry-pick FETCH_HEAD
Review
-
Code review CR -2 Blocked
- Stefan Bürk -2
-
Verified V 0 Needs a vote
- core-ci +1 CI
Issues 1
Files 4
- typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php1+155 −7
- typo3/sysext/core/Resources/Private/Sql/Cache/Backend/Typo3DatabaseBackendCache.sql1+1 −2
- typo3/sysext/core/Resources/Private/Sql/Cache/Backend/Typo3DatabaseBackendTags.sql+1 −2
- typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php+81 −0
Review log 812
-
Adam Koppe uploaded patch set 1 04/21/25, 21:45
-
core-ci voted on patch set 1 V +1 04/21/25, 21:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77996
-
Adam Koppe commented on patch set 1 04/21/25, 21:54
-
Stefan Bürk commented on patch set 1 CR -2 04/22/25, 04:35
Unresolved
-2 to ensure that I have time to look onto this change -
Adam Koppe commented on patch set 1 04/22/25, 05:17
Unresolved
A changelog entry is also required for this breaking change. I guess the content would be something like "Table structure of database-based caches changed". And depending how https://review.typo3.org/c/Packages/TYPO3.CMS/+/89179/comment/b39ebf85_bc3abad5/ turns out upgrade instructions / what to do on errors during upgrade -
Adam Koppe commented on patch set 1 04/22/25, 05:37
Typo3DatabaseBackend.php:139UnresolvedShould we also catch `\Doctrine\DBAL\Exception\UniqueConstraintViolationException` during both `INSERT`-s? That exception will be thrown if another concurrent Typo3DatabaseBackend::set() issues its `INSERT` before we issue our. If the exception happens we could just do nothing, as the concurrent Typo3DatabaseBackend::set() calls could have been ordered in a way where our (the throwing call) is ordered first and the other call immediate overwrites the cache entry afterwards. -
Adam Koppe updated the commit message in patch set 2
V +104/24/25, 20:02Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 2 V +1 04/24/25, 20:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78149
-
Simon Schaufelberger updated the commit message in patch set 3
V +111/07/25, 18:50Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 3 V -1 11/07/25, 18:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88671
-
Adam Koppe uploaded patch set 4
V -104/22/26, 11:01Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 4 V +1 04/22/26, 12:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100892
Typo3DatabaseBackendCache.sql:5Unresolved