Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropOldContentVersionsJob not running on large dataset #30353

Open
erickgonzalez opened this issue Oct 15, 2024 · 0 comments
Open

DropOldContentVersionsJob not running on large dataset #30353

erickgonzalez opened this issue Oct 15, 2024 · 0 comments

Comments

@erickgonzalez
Copy link
Contributor

Parent Issue

#26188

Problem Statement

The DropOldContentVersionsJob is not running successfully on large dataset. It starts but never gets finish due some slow query issue:

2024-09-30 22:00:00.151	
04:00:00.150  INFO  job.DropOldContentVersionsJob - --------------------------------------
2024-09-30 22:00:00.151	
04:00:00.150  INFO  job.DropOldContentVersionsJob - DropOldContentVersionsJob has started
2024-09-30 22:00:00.151	
04:00:00.150  INFO  job.DropOldContentVersionsJob - -> Deleting Contentlets older than 365 days...
04:05:10.895  WARN  db.DotConnect - Somewhat slow query, total time: 302812.75ms, query preparation time: 0.022711ms, query execution time: 302812.7ms, metadata time: 5.0E-5ms, SQL: SELECT DISTINCT inode FROM contentlet WHERE identifier <> 'SYSTEM_HOST' AND mod_date < ? AND  inode NOT IN (SELECT working_inode FROM contentlet_version_info WHERE working_inode = contentlet.inode) AND  inode NOT IN (SELECT live_inode FROM contentlet_version_info WHERE live_inode = contentlet.inode), parameters: [2023-10-01 00:00:00.0]

After this nothing else is logged.

Steps to Reproduce

Run the DropOldContentVersionsJob on a customer with a large dataset.

Acceptance Criteria

DropOldContentVersionsJob should run successfully

dotCMS Version

23.10+

Proposed Objective

Customer Support

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

We need to optimize this query https://github.com/dotCMS/core/blob/main/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java#L715-L719 probably pull by batches.

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

1 participant