Project

General

Profile

Actions

Bug #104407

open

OrphanRecordsCommand fails if list of ids is too long

Added by Roman Teitge 4 months ago. Updated 9 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2024-07-17
Due date:
% Done:

0%

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

Description

When running typo3 cleanup:orphanrecords -v via CLI in a big instance mysql throws error because of exceeding the query size limit.
At https://github.com/TYPO3-CMS/lowlevel/blob/main/Classes/Command/OrphanRecordsCommand.php#L102 it searches for all records that are NOT connected. But the $idList array parameter for the notIn() condition is very long in a big instance. And it grows if new entries are added, so raising the query size limit would do it only for the moment. Not to mention the consumption of resources (RAM, CPU).

Actions

Also available in: Atom PDF