Project

General

Profile

Actions

Bug #86028

closed

getTreeList inserts duplicate keys in cache_treelist

Added by Olaf Döring over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
Caching
Start date:
2018-08-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In my installation the getTreeList() function from TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer tries to insert a duplicate entry into cache_treelist.
I think this is possible on large sites with many getTreeList usage.

I think it will help to encapsulate the following block (line 6978-6986) into a try/catch construct:

GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('cache_treelist')->insert(
                'cache_treelist',
                [
                    'md5hash' => $requestHash,
                    'pid' => $id,
                    'treelist' => implode(',', $theList),
                    'tstamp' => $GLOBALS['EXEC_TIME']
                ]
            );

If it fails inserting, there is an entry inserted just microseconds before, so we can ignore that.
The problem occures every 2-3 days.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #87139: Regression: getTreeList inserts duplicate keys in cache_treelistClosedAlexander Schnitzler2018-12-12

Actions
Has duplicate TYPO3 Core - Bug #86491: Duplicate entry for PRIMARY key in cache_treelistClosedAlexander Schnitzler2018-10-01

Actions
Actions

Also available in: Atom PDF