Bug #87139
closedRegression: getTreeList inserts duplicate keys in cache_treelist
100%
Description
Unfortunately https://review.typo3.org/58951/ did not actually solve issues 86028 and 86491 for good.
There are several issues with the last approach:
1) The expiration time of all created caches was 0, which resulted in a permanent creation and deletion of cache entries. This behaviour cannot be called caching.
2) Number 1 increases the chance for race conditions where several parallel requests tried to create the same cache entry.
The solution:
New cache entries get an expiry date of 2145909600 (that's equal PHP_INT_MAX (32bit) and the same number that is used in the caching framework).
Also, new caches are created within a transaction, which prevents duplicate key errors.
Updated by Alexander Schnitzler almost 6 years ago
- Related to Bug #86028: getTreeList inserts duplicate keys in cache_treelist added
Updated by Alexander Schnitzler almost 6 years ago
- Related to Bug #86491: Duplicate entry for PRIMARY key in cache_treelist added
Updated by Gerrit Code Review almost 6 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59127
Updated by Gerrit Code Review almost 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59127
Updated by Markus Klein almost 6 years ago
To reduce the load on the server while massive number of requests do the same work to generate the cache content, I propose to employ locking instead of transactions. Paradigm: Do work only once.
Basic scheme:
- try cache
- when hit, return
- when miss, then acquire lock
- try cache again (might have been filled meanwhile)
- when hit, release lock, return
- when miss, generate content
- store cache entry, release lock, return
Updated by Gerrit Code Review almost 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59127
Updated by Gerrit Code Review almost 6 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59127
Updated by Gerrit Code Review almost 6 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59127
Updated by Gerrit Code Review almost 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59139
Updated by Anonymous almost 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 190654d81ed56fdfdc2795ed6d0a73c58eebc91d.