[SERVER-15800] Scheduler for TTL index deletion windows Created: 24/Oct/14  Updated: 10/Dec/14  Resolved: 25/Oct/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Jon Rangel (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-13937 Allow setting a window and interval f... Closed
Related
is related to SERVER-8616 Adding Tunable to TTL Collection thread Closed
is related to SERVER-6712 Make TTL Collection background task p... Closed
Participants:

 Description   

Add the capability to schedule TTL index deletion, analogous to how we can schedule the cluster balancer.

Use case: 9-5 systems that want to perform TTL deletion of old data outside of business hours to avoid additional performance overhead during busy periods.

This can be approximated today by running a cron job to do something like the following, but it would be a nice-to-have in the database:

  • At start of TTL deletion window:

db.runCommand({collMod: "collection-name",
               index: {keyPattern: {ts:1},
                       expireAfterSeconds: <desired expiry age>}})

  • At end of TTL deletion window:

db.runCommand({collMod: "collection-name",
               index: {keyPattern: {ts:1},
                       expireAfterSeconds: <some very large value>}})


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