Details
-
Bug
-
Resolution: Fixed
-
High
-
5.3, 5.4.5
-
None
Description
If, for some reason (for instance in result of script execution failure due to EZP-21840), cleanup old versions of content does not run for sometime, one can end up in a scenario where there are more old versions that the legacy cleanupversions script can handle.
steps to reproduce
- create an image object
- edit and publish this object many times (say 1000, use the command below if needed)
- setup [VersionManagement] DefaultVersionHistoryLimit=10
- execute php ezpublish/console ezpublish:legacy:script bin/php/cleanupversions.php
=> the script will take too long to execute and fail due to database timeout
create new versions command
$repository = $this->getContainer()->get('ezpublish.api.repository'); $repository->setCurrentUser($repository->getUserService()->loadUser(14)); $contentService = $repository->getContentService(); $contentInfo = $contentService->loadContentInfo(<your-image-object-id>); for ($f = 0; $f < 1200; $f++) { $contentDraft = $contentService->createContentDraft($contentInfo); $content = $contentService->publishVersion($contentDraft->versionInfo); }
Attachments
Issue Links
- relates to
-
EZP-26361 cleanupversions.php does not scale on large amounts of versions
- Backlog