[SERVER-43244] delete limited expired docs in every TTL period Created: 10/Sep/19  Updated: 05/Sep/21  Resolved: 16/Aug/21

Status: Closed
Project: Core Server
Component/s: TTL
Affects Version/s: Needs Further Definition
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: peng zhenyi Assignee: Ethan Zhang (Inactive)
Resolution: Won't Do Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-6712 Make TTL Collection background task p... Closed
Sprint: Query Execution 2021-07-26, QE 2021-08-09, QE 2021-08-23
Participants:

 Description   

TTL monitor delete all the expired docs every 60 seconds.
Sometimes a few expired docs exist in one TTL monitor period, and lots of expired docs in the next TTL monitor period. Then a big performance degration happens as too many delete requests appears in a short time.

If 'ttlDeleteBatch' is supported, we can delete a limited number of docs in one period which is under control, then no performance degration will happen.



 Comments   
Comment by peng zhenyi [ 10/Sep/19 ]

The pull request: https://github.com/mongodb/mongo/pull/1322

A server parameter 'ttlDeleteBatch' is declared to control the maximum deleted docs number every TTL period.
The default value is std::numeric_limits::max(), which means no limitation

Generated at Thu Feb 08 05:02:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.